diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-08-28 12:45:10 +1000 |
|---|---|---|
| committer | cooljqln <cooljqln@noreply.codeberg.org> | 2024-08-28 04:07:21 +0000 |
| commit | 9ec8d6dafcee6c9722672eefad28ee3aeba4feb9 (patch) | |
| tree | 7fc8068ff4cd70bee413d29b0dd9e52b7d6c2cf2 /lua/playing.lua | |
| parent | d3c15bf070ff6214cd48fa04027ee5d105bc38b7 (diff) | |
| download | tangara-fw-9ec8d6dafcee6c9722672eefad28ee3aeba4feb9.tar.gz | |
Handle the loading state whilst appending many tracks better
1) Update the queue length periodically so that the user can see we're
working
2) Clear any previous track and display "loading..." instead
Diffstat (limited to 'lua/playing.lua')
| -rw-r--r-- | lua/playing.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lua/playing.lua b/lua/playing.lua index 942b8836..ff503a6c 100644 --- a/lua/playing.lua +++ b/lua/playing.lua @@ -226,7 +226,18 @@ return screen:new { end end), playback.track:bind(function(track) - if not track then return end + if not track then + if queue.loading:get() then + title:set { text = "Loading..." } + else + title:set { text = "" } + end + artist:set { text = "" } + cur_time:set { text = format_time(0) } + end_time:set { text = format_time(0) } + scrubber:set { value = 0 } + return + end if track.duration then end_time:set { text = format_time(track.duration) } else |
