1
0

In main.js also update MLS.

This commit is contained in:
Alexander Andreev 2023-10-08 04:09:41 +04:00
parent 2ea21e12b2
commit 7f1a49ec91
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -21,6 +21,16 @@ async function updateStatus() {
const s = await resp.json(); const s = await resp.json();
if (undefined != s.most_listened_song) {
$("radio-mls-song").textContent = s.most_listened_song.song;
$("radio-mls-listeners").textContent = s.most_listened_song.listeners;
$("radio-mls-date").textContent = (new Intl.DateTimeFormat('en-GB',
{timeStyle: "long",
dateStyle: "long",
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone}))
.format(new Date(s.most_listened_song.date))
}
if (undefined == s.current_song) if (undefined == s.current_song)
return [-1, null]; return [-1, null];