Skip to content

Commit

Permalink
[bugfix]: set MPV queue when now or queue is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
kgarner7 committed Feb 13, 2024
1 parent 8de21a7 commit e6b01d4
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,12 @@ export const useHandlePlayQueueAdd = () => {
if (playerType === PlaybackType.LOCAL) {
mpvPlayer!.volume(usePlayerStore.getState().volume);

if (playType === Play.NEXT || playType === Play.LAST) {
mpvPlayer!.setQueueNext(playerData);
}

if (playType === Play.NOW) {
if (playType === Play.NOW || !hadSong) {
mpvPlayer!.pause();
mpvPlayer!.setQueue(playerData);
mpvPlayer!.play();
} else {
mpvPlayer!.setQueueNext(playerData);
}
}

Expand Down

0 comments on commit e6b01d4

Please sign in to comment.