1
0

Updated using of SongList.Current() in an index.pug file.

This commit is contained in:
Alexander Andreev 2023-10-05 18:53:57 +04:00
parent 9beb179cc0
commit c33ff03bd8
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -45,8 +45,9 @@ html(lang='en')
source(src='/live/stream.ogg' type='audio/ogg')
| Your browser doesn't support an audio element, it's sad... But you always can take the #[a(href='/playlist') playlist]!
div
if (songList.Current() != nil)
p Now playing: #[span#radio-song #{songList.Current().ArtistTitle()}] ( #[span#radio-duration-estimate ] #[span#radio-duration #{songList.Current().DurationString()}] )
- cur := songList.Current()
if (cur.Artist != "")
p Now playing: #[span#radio-song #{cur.ArtistTitle()}] ( #[span#radio-duration-estimate ] #[span#radio-duration #{cur.DurationString()}] )
else
p Now playing: #[span#radio-song ] ( #[span#radio-duration-estimate ] #[span#radio-duration ] )
p Current/peak listeners: #[span#radio-listeners #{listeners.Current()}] / #[span#radio-listener-peak #{listeners.Peak()}]