fixed player behavior after final queue track completes, added click to play from queue window
This commit is contained in:
@@ -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
|
||||
// ===================================================================
|
||||
|
||||
Reference in New Issue
Block a user