Since Icecast pretty much never get restarted, here I switched to a start date of a stream (Liquidsoap).

This commit is contained in:
Alexander Andreev 2021-12-05 20:34:45 +04:00
parent 06d7c66ffb
commit 5d832f9d11
Signed by: Arav
GPG Key ID: 610DF2574456329F

View File

@ -15,8 +15,8 @@ async function getRadioStatus() {
try {
let status = await fetch('http://radio.arav.home.arpa/status-json.xsl').then(r => r.json());
return {
server_start_iso8601: status.icestats.server_start_iso8601,
server_start_date: util.datetime(status.icestats.server_start_iso8601, util.date_formats.post_date),
server_start_iso8601: status.icestats.source.stream_start_iso8601,
server_start_date: util.datetime(status.icestats.source.stream_start_iso8601, util.date_formats.post_date),
song: `${status.icestats.source.artist} - ${status.icestats.source.title}`,
listener_peak: status.icestats.source.listener_peak,
listeners: status.icestats.source.listeners