fix: remove undefined catch from preloadNextTracks()

This commit is contained in:
binimum 2026-04-04 20:39:51 +00:00 committed by GitHub
parent 8a377d5332
commit 6557e525b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1106,7 +1106,7 @@ export class Player {
} }
} }
void this.preloadNextTracks().catch(console.error); this.preloadNextTracks();
} catch (error) { } catch (error) {
if (this.playbackSequence !== currentSequence) return; if (this.playbackSequence !== currentSequence) return;
if (error && (error.name === 'NotAllowedError' || error.name === 'AbortError')) { if (error && (error.name === 'NotAllowedError' || error.name === 'AbortError')) {
@ -1479,7 +1479,7 @@ export class Player {
} }
this.preloadCache.clear(); this.preloadCache.clear();
void this.preloadNextTracks().catch(console.error); this.preloadNextTracks();
await this.saveQueueState(); await this.saveQueueState();
} }
@ -1595,7 +1595,7 @@ export class Player {
} }
await this.saveQueueState(); await this.saveQueueState();
void this.preloadNextTracks().catch(console.error); // Update preload since next track changed this.preloadNextTracks(); // Update preload since next track changed
} }
async removeFromQueue(index) { async removeFromQueue(index) {
@ -1623,7 +1623,7 @@ export class Player {
} }
await this.saveQueueState(); await this.saveQueueState();
void this.preloadNextTracks().catch(console.error); this.preloadNextTracks();
} }
async clearQueue() { async clearQueue() {