From 35429e57d29c79a27392adb7e0b2527baf17607f Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 2 Oct 2023 03:55:51 +0400 Subject: [PATCH] In an index.pug added span#radio-duration. --- web/templates/index.pug | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/templates/index.pug b/web/templates/index.pug index ccc6a52..c54e214 100644 --- a/web/templates/index.pug +++ b/web/templates/index.pug @@ -45,7 +45,10 @@ 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 - p Now playing: #[span#radio-song #{songList.Current().ArtistTitle()}] + if (songList.Current() != nil) + p Now playing: #[span#radio-song #{songList.Current().ArtistTitle()}] #[span#radio-duration #{songList.Current().DurationString()}] + else + p Now playing: #[span#radio-song ] #[span#radio-duration ] p Current/peak listeners: #[span#radio-listeners #{listeners.Current()}] / #[span#radio-listener-peak #{listeners.Peak()}] p small Notice: information updates every 45 seconds. But you can #[button#radio-update update] it forcibly.