When clicking a track in the file browser, play it

Includes adding a `playback.is_playable` for working out whether or not
a particular file is able to be played
This commit is contained in:
jacqueline
2024-08-28 15:30:53 +10:00
parent af7a70450e
commit 3421bd652c
5 changed files with 28 additions and 17 deletions
+6 -2
View File
@@ -65,11 +65,15 @@ return screen:new {
iterator = filesystem.iterator(item:filepath()),
breadcrumb = item:filepath()
})
end
if item:filepath():match("%.playlist$") then
elseif item:filepath():match("%.playlist$") then
queue.open_playlist(item:filepath())
playback.playing:set(true)
backstack.push(playing:new())
elseif playback.is_playable(item:filepath()) then
queue.clear()
queue.add(item:filepath())
playback.playing:set(true)
backstack.push(playing:new())
end
end
end