fix mpv player queue behavior to handle gapless playback

This commit is contained in:
jeffvli
2025-12-11 20:36:47 -08:00
parent f7d488ba84
commit 61e70342a4
7 changed files with 283 additions and 102 deletions
+18
View File
@@ -3,6 +3,9 @@ import { LibraryItem } from '/@/shared/types/domain-types';
export type EventMap = {
ITEM_LIST_REFRESH: ItemListRefreshEventPayload;
ITEM_LIST_UPDATE_ITEM: ItemListUpdateItemEventPayload;
MEDIA_NEXT: MediaNextEventPayload;
MEDIA_PREV: MediaPrevEventPayload;
PLAYER_PLAY: PlayerPlayEventPayload;
PLAYLIST_MOVE_DOWN: PlaylistMoveEventPayload;
PLAYLIST_MOVE_TO_BOTTOM: PlaylistMoveEventPayload;
PLAYLIST_MOVE_TO_TOP: PlaylistMoveEventPayload;
@@ -22,6 +25,21 @@ export type ItemListUpdateItemEventPayload = {
key: string;
};
export type MediaNextEventPayload = {
currentIndex: number;
nextIndex: number;
};
export type MediaPrevEventPayload = {
currentIndex: number;
prevIndex: number;
};
export type PlayerPlayEventPayload = {
id: string;
index: number;
};
export type PlaylistMoveEventPayload = {
playlistId: string;
sourceIds: string[];