summaryrefslogtreecommitdiff
path: root/lua/main_menu.lua
diff options
context:
space:
mode:
authorSam <github@samlord.co.uk>2025-02-01 17:23:24 +0000
committerSam <github@samlord.co.uk>2025-02-01 17:23:24 +0000
commite343ffee5a4663374a77073a3e4370041f2fc431 (patch)
tree1e87af364dc3b2d31070921ff04199c932ada129 /lua/main_menu.lua
parentb98e67972bca390961ecd2240ab3d3553ea0bf86 (diff)
downloadtangara-fw-e343ffee5a4663374a77073a3e4370041f2fc431.tar.gz
Add playlist browser
Add a menu item to main menu and associated browser for playlist files in the root of the SD card
Diffstat (limited to 'lua/main_menu.lua')
-rw-r--r--lua/main_menu.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/lua/main_menu.lua b/lua/main_menu.lua
index cc7874d7..80d5b599 100644
--- a/lua/main_menu.lua
+++ b/lua/main_menu.lua
@@ -131,6 +131,14 @@ return widgets.MenuScreen:new {
})
end
+ local playlist_btn = indexes_list:add_btn(nil, "Playlists")
+ playlist_btn:onClicked(function()
+ backstack.push(require("playlist_browser"):new {
+ title = "Playlists",
+ })
+ end)
+ playlist_btn:add_style(styles.list_item)
+
local function show_no_indexes(msg)
indexes_list:add_flag(lvgl.FLAG.HIDDEN)
no_indexes_container:clear_flag(lvgl.FLAG.HIDDEN)