diff --git a/src/renderer/components/audio-player/utils/list-handlers.ts b/src/renderer/components/audio-player/utils/list-handlers.ts index be2a09524..459de6941 100644 --- a/src/renderer/components/audio-player/utils/list-handlers.ts +++ b/src/renderer/components/audio-player/utils/list-handlers.ts @@ -23,7 +23,7 @@ export const gaplessHandler = (args: { const durationPadding = isFlac ? 0.065 : 0.116; if (currentTime + durationPadding >= duration) { - return nextPlayerRef.current.getInternalPlayer().play(); + return nextPlayerRef.current.getInternalPlayer()?.play(); } return null; diff --git a/src/renderer/store/player.store.ts b/src/renderer/store/player.store.ts index af7f250a7..caeab9e78 100644 --- a/src/renderer/store/player.store.ts +++ b/src/renderer/store/player.store.ts @@ -261,6 +261,13 @@ export const usePlayerStore = create()( }); } + if (isLastTrack && repeat === PlayerRepeat.NONE) { + set((state) => { + state.current.time = 0; + state.current.status = PlayerStatus.PAUSED; + }); + } + return get().actions.getPlayerData(); }, checkIsFirstTrack: () => {