Don't poll API for selector stuff if on BAPS.
This commit is contained in:
parent
7508756b00
commit
bf050fe656
1 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,8 @@ const SILENCE_WARN_SECS = 5;
|
||||||
|
|
||||||
export function Timelord() {
|
export function Timelord() {
|
||||||
async function getSource() {
|
async function getSource() {
|
||||||
|
if (process.env.REACT_APP_BAPSICLE_INTERFACE)
|
||||||
|
return { id: -1, name: "Unknown" };
|
||||||
let studio = await myradioApiRequest("/selector/studioattime", "GET", null);
|
let studio = await myradioApiRequest("/selector/studioattime", "GET", null);
|
||||||
|
|
||||||
const sourceNames = [
|
const sourceNames = [
|
||||||
|
@ -33,6 +35,7 @@ export function Timelord() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getSilence() {
|
async function getSilence() {
|
||||||
|
if (process.env.REACT_APP_BAPSICLE_INTERFACE) return false;
|
||||||
let silence = await myradioApiRequest("/selector/issilence", "GET", null);
|
let silence = await myradioApiRequest("/selector/issilence", "GET", null);
|
||||||
|
|
||||||
return silence >= SILENCE_WARN_SECS;
|
return silence >= SILENCE_WARN_SECS;
|
||||||
|
|
Loading…
Reference in a new issue