diff --git a/src/modules/anonradio.js b/src/modules/anonradio.js index 7a3e8e8..cd4a3d3 100644 --- a/src/modules/anonradio.js +++ b/src/modules/anonradio.js @@ -38,13 +38,19 @@ async function updateNowPlaying() { } } - if (!playing || !schedule) return; + if (!playing || !schedule) { + hf.__anonradio_timeout = setTimeout(updateNowPlaying, 2000); + return; + } let lines = schedule.split("\n"); lines = lines.slice(4, lines.length - 2); const line = lines[0]; - if (!line) return; + if (!line) { + hf.__anonradio_timeout = setTimeout(updateNowPlaying, 2000); + return; + } const [_, _time, id, name] = line.match(/^(.{3,4} .{4})\s+(.+?) {2}(.+?)$/);