From bad0e80ab4aa8e43b5676d7b876c4e652f3e125e Mon Sep 17 00:00:00 2001 From: ThinLiquid Date: Sun, 12 May 2024 17:25:43 +0100 Subject: [PATCH] e --- src/main.ts | 8 -------- src/player.ts | 4 ++-- src/searchpal.ts | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main.ts b/src/main.ts index ede959c..7331560 100644 --- a/src/main.ts +++ b/src/main.ts @@ -40,20 +40,12 @@ try { ]) } catch (e) { console.error('Failed to set localForage driver:', e) - // handle error appropriately } const params = new URLSearchParams(window.location.search) if (params.has('crt')) { document.body.classList.add('crt') } -if (params.has('debug')) { - ;(function () { - let src = 'https://cdn.jsdelivr.net/npm/eruda' - document.body.innerHTML += ('') - document.body.innerHTML += ('eruda.init();') - })() -} const auth = (): SpotifyApi => SpotifyApi.withUserAuthorization( import.meta.env.VITE_SPOTIFY_CLIENT_ID, diff --git a/src/player.ts b/src/player.ts index 127a164..943264c 100644 --- a/src/player.ts +++ b/src/player.ts @@ -407,7 +407,7 @@ class Player { * @memberof Player */ async next (): Promise { - if (this.queue.index >= this.queue.tracks.length - 1) { // Prefetch when there's only one track left + if (this.queue.index >= this.queue.tracks.length) { if (this.sdk == null) { return } @@ -444,7 +444,7 @@ class Player { } private handleError (error: any): void { - this.handleError(error) + console.error(error) } } diff --git a/src/searchpal.ts b/src/searchpal.ts index 08d043d..45fc934 100644 --- a/src/searchpal.ts +++ b/src/searchpal.ts @@ -325,7 +325,7 @@ class SearchPalette { }) ) } - + /** * Show the search palette *