In main.js also update MLS.
This commit is contained in:
parent
2ea21e12b2
commit
7f1a49ec91
@ -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];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user