From b34959917446ac5d47ddec7bb6d98a6397045558 Mon Sep 17 00:00:00 2001 From: ailurux Date: Tue, 30 Jul 2024 04:36:48 +0000 Subject: daniel/playlist-queue (#84) Support for playlist files being opened along side the queue's own playlist. Playlists can be opened from the file browser, if the file ends in ".playlist" (will add support for .m3u as well eventually) Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/84 Co-authored-by: ailurux Co-committed-by: ailurux --- lua/file_browser.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/file_browser.lua b/lua/file_browser.lua index 91b84c84..aed4aef8 100644 --- a/lua/file_browser.lua +++ b/lua/file_browser.lua @@ -62,10 +62,14 @@ return screen:new{ if is_dir then backstack.push(require("file_browser"):new{ title = self.title, - iterator = filesystem.iterator(tostring(item)), - breadcrumb = tostring(item) + iterator = filesystem.iterator(item:filepath()), + breadcrumb = item:filepath() }) end + if item:filepath():match("%.playlist$") then + queue.open_playlist(item:filepath()) + backstack.push(playing:new()) + end end end }) -- cgit v1.2.3