From ed9ee3060a2220b5af4d71608692855bbebb5024 Mon Sep 17 00:00:00 2001 From: SamidyFR <168582143+SamidyFR@users.noreply.github.com> Date: Sat, 17 Jan 2026 01:04:40 +0000 Subject: [PATCH] style: auto-fix linting issues --- index.html | 5 ++++- js/app.js | 8 ++++---- js/lastfm.js | 2 +- js/player.js | 4 ++-- js/storage.js | 7 ++++++- public/instances.json | 7 ++++++- 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 83bde63..4cdc3b2 100644 --- a/index.html +++ b/index.html @@ -677,7 +677,10 @@ Select Music Folder -
diff --git a/js/app.js b/js/app.js index 9b51a36..27c52b3 100644 --- a/js/app.js +++ b/js/app.js @@ -1031,17 +1031,17 @@ document.addEventListener('DOMContentLoaded', async () => { const track = contextMenu._contextTrack; const albumItem = contextMenu.querySelector('[data-action="go-to-album"]'); const artistItem = contextMenu.querySelector('[data-action="go-to-artist"]'); - + if (track) { if (albumItem) { let label = 'Album'; const albumType = track.album?.type?.toUpperCase(); const trackCount = track.album?.numberOfTracks; - + if (albumType === 'SINGLE' || trackCount === 1) label = 'Single'; else if (albumType === 'EP') label = 'EP'; else if (trackCount && trackCount <= 6) label = 'EP'; - + albumItem.textContent = `Go to ${label}`; albumItem.style.display = track.album ? 'block' : 'none'; } @@ -1054,7 +1054,7 @@ document.addEventListener('DOMContentLoaded', async () => { } }); }); - + observer.observe(contextMenu, { attributes: true }); } }); diff --git a/js/lastfm.js b/js/lastfm.js index 196b560..f07f6ab 100644 --- a/js/lastfm.js +++ b/js/lastfm.js @@ -261,4 +261,4 @@ export class LastFMScrobbler { this.clearScrobbleTimer(); this.currentTrack = null; } -} \ No newline at end of file +} diff --git a/js/player.js b/js/player.js index c1d5543..0ff5731 100644 --- a/js/player.js +++ b/js/player.js @@ -426,12 +426,12 @@ export class Player { if (this.shuffleActive) { this.originalQueueBeforeShuffle = [...this.queue]; const currentTrack = this.queue[this.currentQueueIndex]; - + const tracksToShuffle = [...this.queue]; if (currentTrack && this.currentQueueIndex >= 0) { tracksToShuffle.splice(this.currentQueueIndex, 1); } - + tracksToShuffle.sort(() => Math.random() - 0.5); if (currentTrack) { diff --git a/js/storage.js b/js/storage.js index 0847d76..abfa17b 100644 --- a/js/storage.js +++ b/js/storage.js @@ -53,7 +53,12 @@ export const apiSettings = { } catch (error) { console.error('Failed to load instances from GitHub:', error); this.defaultInstances = { - api: ['https://triton.squid.wtf', 'https://wolf.qqdl.site', "https://tidal-api.binimum.org", "https://monochrome-api.samidy.com"], + api: [ + 'https://triton.squid.wtf', + 'https://wolf.qqdl.site', + 'https://tidal-api.binimum.org', + 'https://monochrome-api.samidy.com', + ], streaming: [ 'https://triton.squid.wtf', 'https://wolf.qqdl.site', diff --git a/public/instances.json b/public/instances.json index 21ae8c4..e191233 100644 --- a/public/instances.json +++ b/public/instances.json @@ -1,5 +1,10 @@ { - "api": ["https://tidal-api.binimum.org", "https://monochrome-api.samidy.com", "https://triton.squid.wtf", "https://wolf.qqdl.site"], + "api": [ + "https://tidal-api.binimum.org", + "https://monochrome-api.samidy.com", + "https://triton.squid.wtf", + "https://wolf.qqdl.site" + ], "streaming": [ "https://triton.squid.wtf", "https://wolf.qqdl.site",