This commit is contained in:
Henry Jameson 2026-01-14 15:41:21 +02:00
commit eb48f19198

View file

@ -68,15 +68,15 @@ const loop = async () => {
);
const { state } = await response.json();
const isLive = state.id === 1; // published
constole.info('Live: ', isLive, currentlyLive)
console.info('Live: ', isLive, currentlyLive)
const stateChange = isLive !== globalState.currentlyLive;
constole.info('State change', stateChange)
console.info('State change', stateChange)
globalState.currentlyLive = isLive;
constole.info('State: ', state)
console.info('State: ', state)
if (stateChange) {
if (isLive) {
constole.info('Went live!')
console.info('Went live!')
await post({
spoiler_text: 'Stream announcment',
status: [
@ -92,7 +92,7 @@ const loop = async () => {
external_link: `https://tube.ebin.club/w/${videoId}`,
});
} else {
constole.info('Went offline...')
console.info('Went offline...')
await scrobble({
title: 'Stream over',
});