From e8f5e73b1a83a4d4742d60fb8cbb3a5642c8c8d5 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 16 May 2024 12:20:15 +1000 Subject: [PATCH] Handle tracks with no duration in the playback screen --- lua/playing.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/playing.lua b/lua/playing.lua index bfca8b68..8d89ad5f 100644 --- a/lua/playing.lua +++ b/lua/playing.lua @@ -223,9 +223,11 @@ return screen:new { end), playback.track:bind(function(track) if not track then return end - end_time:set { - text = format_time(track.duration) - } + if track.duration then + end_time:set { text = format_time(track.duration) } + else + end_time:set { text = format_time(playback.position:get()) } + end title:set { text = track.title } artist:set { text = track.artist } end),