the_news: check if we're connected prior to asking for nextTransition
This commit is contained in:
parent
b11de69b0a
commit
ebfde59120
1 changed files with 9 additions and 7 deletions
|
@ -51,6 +51,7 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
|
||||||
if (state.settings.doTheNews === "always") {
|
if (state.settings.doTheNews === "always") {
|
||||||
await actuallyDoTheNews();
|
await actuallyDoTheNews();
|
||||||
} else if (state.settings.doTheNews === "while_live") {
|
} else if (state.settings.doTheNews === "while_live") {
|
||||||
|
if (state.broadcast.connectionState === "CONNECTED" || state.broadcast.connectionState === "LIVE") {
|
||||||
const transition = await broadcastApiRequest<{
|
const transition = await broadcastApiRequest<{
|
||||||
autoNews: boolean;
|
autoNews: boolean;
|
||||||
selSource: number;
|
selSource: number;
|
||||||
|
@ -60,6 +61,7 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
|
||||||
await actuallyDoTheNews();
|
await actuallyDoTheNews();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let newsTimer: Timer | null = null;
|
let newsTimer: Timer | null = null;
|
||||||
|
|
Loading…
Reference in a new issue