diff options
| author | rdsh <rdsh@noreply.codeberg.org> | 2025-02-05 21:57:45 +0000 |
|---|---|---|
| committer | rdsh <rdsh@noreply.codeberg.org> | 2025-02-05 21:57:45 +0000 |
| commit | 2ec84a1393331f57f8402bce66d337c0dd255f64 (patch) | |
| tree | 30f271bf10988a9717abdf266d135e3ec0ae2d31 /lua/file_browser.lua | |
| parent | ddcd06dbca61fc55a7c2cd68f82f8cfe7b4c5cbf (diff) | |
| parent | 9ecb79a264daa7896ce7d5a65592c05631213d5a (diff) | |
| download | tangara-fw-2ec84a1393331f57f8402bce66d337c0dd255f64.tar.gz | |
Merge pull request 'main' (#1) from cool-tech-zone/tangara-fw:main into main
Reviewed-on: https://codeberg.org/rdsh/tangara-fw/pulls/1
Diffstat (limited to 'lua/file_browser.lua')
| -rw-r--r-- | lua/file_browser.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/file_browser.lua b/lua/file_browser.lua index a85c2ba2..6289828f 100644 --- a/lua/file_browser.lua +++ b/lua/file_browser.lua @@ -8,11 +8,11 @@ local backstack = require("backstack") local font = require("font") local queue = require("queue") local playing = require("playing") -local styles = require("styles") local playback = require("playback") local theme = require("theme") local screen = require("screen") local filesystem = require("filesystem") +local playlist_iterator = require("playlist_iterator") return screen:new { create_ui = function(self) @@ -59,6 +59,7 @@ return screen:new { end widgets.InfiniteList(self.root, self.iterator, { + focus_first_item = true, callback = function(item) return function() local is_dir = item:is_directory() @@ -69,8 +70,7 @@ return screen:new { breadcrumb = item:filepath() }) elseif - item:filepath():match("%.playlist$") or - item:filepath():match("%.m3u8?$") then + playlist_iterator:is_playlist(item) then queue.open_playlist(item:filepath()) playback.playing:set(true) backstack.push(playing:new()) |
