misc.anonradio: handle up next entries better
This commit is contained in:
parent
85eef5667a
commit
5e972b8fe7
1 changed files with 7 additions and 3 deletions
|
@ -316,11 +316,15 @@ anonradio.callback = async function (msg, line) {
|
||||||
`${DAYS[targetDay]}, ${currentYear}-${targetMonth}-${targetDateDay} ${hour} UTC`
|
`${DAYS[targetDay]}, ${currentYear}-${targetMonth}-${targetDateDay} ${hour} UTC`
|
||||||
) / 1000;
|
) / 1000;
|
||||||
|
|
||||||
parsedLines.push({timestamp, id, name});
|
parsedLines.push({timestamp, id, name: name.replace(" <- Up NEXT", "")});
|
||||||
}
|
}
|
||||||
|
|
||||||
const liveNow = parsedLines.splice(0, 1)[0];
|
let liveNow = {name: "ident", id: "aNONradio"};
|
||||||
|
|
||||||
|
if (parsedLines[0].name.includes("<- Live NOW")) {
|
||||||
|
liveNow = parsedLines.splice(0, 1)[0];
|
||||||
liveNow.name = liveNow.name.replace(" <- Live NOW", "");
|
liveNow.name = liveNow.name.replace(" <- Live NOW", "");
|
||||||
|
}
|
||||||
|
|
||||||
let title = "";
|
let title = "";
|
||||||
let subtitle = "";
|
let subtitle = "";
|
||||||
|
|
Loading…
Reference in a new issue