fix: preserve failed media queue item
This commit is contained in:
1 parent
3b6bf49160
commit
2194d4a8b6
2 files changed
+13
-4
No files matched your search
@@ -38,11 +38,11 @@ export class MediaQueue {
|
||||
this.current = null;
|
||||
}
|
||||
|
||||
failCurrent(): void {
|
||||
if (this.current) {
|
||||
this.current = { ...this.current, status: "failed" };
|
||||
}
|
||||
failCurrent(): MediaQueueItem | null {
|
||||
if (!this.current) return null;
|
||||
const failed = { ...this.current, status: "failed" as const };
|
||||
this.current = null;
|
||||
return failed;
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
|
||||
Reference in new issue
Block a user