From 4bcabb6fb0804981fef373bf956a17b73b98bf84 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sat, 6 Feb 2021 20:06:30 +0000 Subject: [PATCH] Fix silence detection threshold. --- src/navbar/timelord.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/navbar/timelord.tsx b/src/navbar/timelord.tsx index b072927..cb81091 100644 --- a/src/navbar/timelord.tsx +++ b/src/navbar/timelord.tsx @@ -6,6 +6,8 @@ import { useInterval } from "../lib/utils"; import { RootState } from "../rootReducer"; import "./timelord.scss"; +const SILENCE_WARN_SECS = 5; + export function Timelord() { async function getSource() { let studio = await myradioApiRequest("/selector/studioattime", "GET", null); @@ -32,7 +34,7 @@ export function Timelord() { async function getSilence() { let silence = await myradioApiRequest("/selector/issilence", "GET", null); - return silence; + return silence >= SILENCE_WARN_SECS; } const broadcastStage = useSelector(