From 5d832f9d1191a103de9ddaa7bd48e7db3a36d7d4 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 5 Dec 2021 20:34:45 +0400 Subject: [PATCH] Since Icecast pretty much never get restarted, here I switched to a start date of a stream (Liquidsoap). --- radio/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/index.js b/radio/index.js index 3483ef0..0f7c075 100644 --- a/radio/index.js +++ b/radio/index.js @@ -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