Hide the album line if the current track has no album

custom
jacqueline 4 months ago
parent 25ecf038ac
commit 0ca7328d0a
  1. 7
      lua/playing.lua

@ -271,7 +271,12 @@ return screen:new {
end_time:set { text = format_time(playback.position:get()) } end_time:set { text = format_time(playback.position:get()) }
end end
title:set { text = track.title } title:set { text = track.title }
album:set { text = string.sub(track.album, 1, 58) } if track.album then
album:set { text = string.sub(track.album, 1, 58) }
album:clear_flag(lvgl.FLAG.HIDDEN)
else
album:add_flag(lvgl.FLAG.HIDDEN)
end
artist:set { text = track.artist } artist:set { text = track.artist }
end), end),
queue.position:bind(function(pos) queue.position:bind(function(pos)

Loading…
Cancel
Save