From 03146644c2bc6efbed046840e066fd1ed9422c11 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sun, 29 Mar 2020 13:42:05 +0100 Subject: [PATCH] Fix some tracklisting trackid 0 --- src/mixer/state.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mixer/state.ts b/src/mixer/state.ts index 7e1468b..6ca43a0 100644 --- a/src/mixer/state.ts +++ b/src/mixer/state.ts @@ -388,8 +388,10 @@ export const load = ( dispatch( mixerState.actions.setPlayerState({ player, state: "stopped" }) ); - console.log(dispatch(BroadcastState.tracklistEnd(0))); const state = getState().mixer.players[player]; + if (state.tracklistItemID !== -1) { + dispatch(BroadcastState.tracklistEnd(state.tracklistItemID)); + } if (state.repeat === "one") { wavesurfer.play(); } else if (state.repeat === "all") {