From 8822ccb72b83832f4f331f5e4611be281eadc274 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Mon, 20 Apr 2020 16:08:12 +0200 Subject: [PATCH 01/10] Ignore double loads (fixes #84) --- src/mixer/state.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mixer/state.ts b/src/mixer/state.ts index dd822f3..4699c8d 100644 --- a/src/mixer/state.ts +++ b/src/mixer/state.ts @@ -6,7 +6,7 @@ import { } from "@reduxjs/toolkit"; import fetchProgress, { FetchProgressData } from "fetch-progress"; import Between from "between.js"; -import { PlanItem } from "../showplanner/state"; +import { itemId, PlanItem } from "../showplanner/state"; import * as BroadcastState from "../broadcast/state"; import Keys from "keymaster"; import { Track, MYRADIO_NON_API_BASE, AuxItem } from "../api"; @@ -327,6 +327,11 @@ export const load = ( return; } } + // If this is already the currently loaded item, don't bother + const currentItem = getState().mixer.players[player].loadedItem; + if (currentItem !== null && itemId(currentItem) === itemId(item)) { + return; + } // If we're already loading something, abort it if (typeof loadAbortControllers[player] !== "undefined") { loadAbortControllers[player].abort(); From 556ef1b91670b263590d6d8e92c79f3ce8c2e22f Mon Sep 17 00:00:00 2001 From: michael-grace Date: Wed, 22 Apr 2020 21:31:32 +0100 Subject: [PATCH 02/10] generalise vumeter and add to navbar --- src/navbar/index.tsx | 13 +- src/navbar/navbar.scss | 386 +++++++++++++++------------- src/optionsMenu/MicTab.tsx | 26 +- src/optionsMenu/helpers/VUMeter.tsx | 39 ++- 4 files changed, 256 insertions(+), 208 deletions(-) diff --git a/src/navbar/index.tsx b/src/navbar/index.tsx index feb8c5b..ff53254 100644 --- a/src/navbar/index.tsx +++ b/src/navbar/index.tsx @@ -1,6 +1,7 @@ import React, { useRef, useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import Clock from "react-live-clock"; +import { VUMeter } from "../optionsMenu/helpers/VUMeter"; import { FaRegClock, FaRegUser } from "react-icons/fa"; @@ -68,6 +69,16 @@ export function NavBar() { /> + + +