summaryrefslogtreecommitdiff
path: root/lua/file_browser.lua
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-07-30 04:36:48 +0000
committercooljqln <cooljqln@noreply.codeberg.org>2024-07-30 04:36:48 +0000
commitb34959917446ac5d47ddec7bb6d98a6397045558 (patch)
treebb71f4e85ed1d4979c508ffa1cb0a74ecba0ba54 /lua/file_browser.lua
parent64c8496a91a166e52b7d77a3189e2696720294b7 (diff)
downloadtangara-fw-b34959917446ac5d47ddec7bb6d98a6397045558.tar.gz
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 <ailuruxx@gmail.com> Co-committed-by: ailurux <ailuruxx@gmail.com>
Diffstat (limited to 'lua/file_browser.lua')
-rw-r--r--lua/file_browser.lua8
1 files changed, 6 insertions, 2 deletions
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
})