mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 06:27:09 +01:00
[bugfix]: set MPV queue when now or queue is empty
This commit is contained in:
parent
8de21a707c
commit
e6b01d4e2b
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user