misc.anonradio: better replace
This commit is contained in:
parent
e09d605699
commit
148dd207b9
1 changed files with 13 additions and 13 deletions
|
@ -321,7 +321,19 @@ 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: name.replace(" <- Up NEXT", "")});
|
let nameOut = name;
|
||||||
|
|
||||||
|
if (time == "Sat 0300")
|
||||||
|
nameOut = name.replace(
|
||||||
|
"Open Mic - Anyone can stream",
|
||||||
|
"Synth Battle Royale"
|
||||||
|
);
|
||||||
|
|
||||||
|
parsedLines.push({
|
||||||
|
timestamp,
|
||||||
|
id,
|
||||||
|
name: nameOut.replace(" <- Up NEXT", ""),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let liveNow = {name: "ident", id: "aNONradio"};
|
let liveNow = {name: "ident", id: "aNONradio"};
|
||||||
|
@ -331,18 +343,6 @@ anonradio.callback = async function (msg, line) {
|
||||||
liveNow.name = liveNow.name.replace(" <- Live NOW", "");
|
liveNow.name = liveNow.name.replace(" <- Live NOW", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentHour = now.getUTCHour();
|
|
||||||
const currentDay = now.getUTCDay();
|
|
||||||
// sbr only ever lasts 2 hours on average
|
|
||||||
if (
|
|
||||||
currentDay == 6 &&
|
|
||||||
currentHour >= 3 &&
|
|
||||||
currentHour <= 5 &&
|
|
||||||
liveNow.id == "openmic"
|
|
||||||
) {
|
|
||||||
liveNow.name = "Synth Battle Royale";
|
|
||||||
}
|
|
||||||
|
|
||||||
let title = "";
|
let title = "";
|
||||||
let subtitle = "";
|
let subtitle = "";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue