fixed player behavior after final queue track completes, added click to play from queue window

This commit is contained in:
2026-02-15 16:20:56 -05:00
parent 38f3abbd3e
commit 67cea5cfb0
18 changed files with 438 additions and 89 deletions
+7 -1
View File
@@ -7,6 +7,8 @@ export interface QueueTrack {
audioFileId: number;
filePath: string;
position: number;
title: string;
artist: string;
}
export type RepeatMode = 'off' | 'all' | 'one';
@@ -24,7 +26,7 @@ type Subscriber = () => void;
class QueueStore {
private state: QueueState = {
tracks: [],
currentIndex: 0,
currentIndex: -1,
shuffleMode: false,
repeatMode: 'off',
sourcePlaylistId: 0,
@@ -107,6 +109,10 @@ class QueueStore {
EventsEmit(Events.RequestCycleRepeat);
}
playAtIndex(index: number): void {
EventsEmit(Events.RequestPlayQueueIndex, index);
}
// ===================================================================
// SUBSCRIPTION SYSTEM
// ===================================================================