misc.anonradio: hopefully fix bad titles from bad json formatting on icecast's end
This commit is contained in:
parent
fe7d7b86d3
commit
947a7baa44
1 changed files with 3 additions and 3 deletions
|
@ -281,9 +281,9 @@ anonradio.callback = async function (msg, line) {
|
|||
const schedule = await fetch("https://anonradio.net/schedule/").then((res) =>
|
||||
res.text()
|
||||
);
|
||||
const icecast = await fetch("http://anonradio.net:8010/status-json.xsl").then(
|
||||
(res) => res.json()
|
||||
);
|
||||
const icecast = await fetch("http://anonradio.net:8010/status-json.xsl")
|
||||
.then((res) => res.text())
|
||||
.then((data) => JSON.parse(data.replace(/"title":-,/g, '"title":"-",')));
|
||||
|
||||
let lines = schedule.split("\n");
|
||||
lines = lines.slice(4, lines.length - 2);
|
||||
|
|
Loading…
Reference in a new issue