diff options
| author | jacqueline <me@jacqueline.id.au> | 2025-01-02 14:15:48 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2025-01-02 14:15:48 +1100 |
| commit | 0ca7328d0abd108e0fa28c4784c0d8e7aad7c033 (patch) | |
| tree | e0807949e151816102e1cc9a91207545bd6f42e9 /lua/playing.lua | |
| parent | 25ecf038acf12f1eb766a5b9977b30b5f7688a50 (diff) | |
| download | tangara-fw-0ca7328d0abd108e0fa28c4784c0d8e7aad7c033.tar.gz | |
Hide the album line if the current track has no album
Diffstat (limited to 'lua/playing.lua')
| -rw-r--r-- | lua/playing.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/playing.lua b/lua/playing.lua index 6ed18844..86ecf20c 100644 --- a/lua/playing.lua +++ b/lua/playing.lua @@ -271,7 +271,12 @@ return screen:new { end_time:set { text = format_time(playback.position:get()) } end 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 } end), queue.position:bind(function(pos) |
