diff --git a/web/templates/index.pug b/web/templates/index.pug index e7d54de..9ed6342 100644 --- a/web/templates/index.pug +++ b/web/templates/index.pug @@ -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()}]