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") {