mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 14:37:06 +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) {
|
if (playerType === PlaybackType.LOCAL) {
|
||||||
mpvPlayer!.volume(usePlayerStore.getState().volume);
|
mpvPlayer!.volume(usePlayerStore.getState().volume);
|
||||||
|
|
||||||
if (playType === Play.NEXT || playType === Play.LAST) {
|
if (playType === Play.NOW || !hadSong) {
|
||||||
mpvPlayer!.setQueueNext(playerData);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (playType === Play.NOW) {
|
|
||||||
mpvPlayer!.pause();
|
mpvPlayer!.pause();
|
||||||
mpvPlayer!.setQueue(playerData);
|
mpvPlayer!.setQueue(playerData);
|
||||||
mpvPlayer!.play();
|
mpvPlayer!.play();
|
||||||
|
} else {
|
||||||
|
mpvPlayer!.setQueueNext(playerData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user