diff --git a/js/api.js b/js/api.js index db34287..3640a75 100644 --- a/js/api.js +++ b/js/api.js @@ -1,10 +1,5 @@ //js/api.js -import { - RATE_LIMIT_ERROR_MESSAGE, - deriveTrackQuality, - delay, - isTrackUnavailable, -} from './utils.js'; +import { RATE_LIMIT_ERROR_MESSAGE, deriveTrackQuality, delay, isTrackUnavailable } from './utils.js'; import { APICache } from './cache.js'; import { addMetadataToAudio } from './metadata.js'; import { DashDownloader } from './dash-downloader.js'; diff --git a/js/app.js b/js/app.js index a71666a..c69db72 100644 --- a/js/app.js +++ b/js/app.js @@ -1022,7 +1022,7 @@ document.addEventListener('DOMContentLoaded', async () => { content.scrollTop = 0; } } - + // Reset flag isGoingBack = false; }; diff --git a/js/events.js b/js/events.js index cad21a3..3feef7e 100644 --- a/js/events.js +++ b/js/events.js @@ -910,7 +910,7 @@ export function initializeTrackInteractions(player, api, mainContent, contextMen // Hide actions for unavailable tracks const unavailableActions = ['play-next', 'add-to-queue', 'download', 'track-mix']; - contextMenu.querySelectorAll('[data-action]').forEach(btn => { + contextMenu.querySelectorAll('[data-action]').forEach((btn) => { if (unavailableActions.includes(btn.dataset.action)) { btn.style.display = contextTrack.isUnavailable ? 'none' : 'block'; } diff --git a/js/player.js b/js/player.js index 4c072e6..11b2e29 100644 --- a/js/player.js +++ b/js/player.js @@ -433,7 +433,7 @@ export class Player { this.currentQueueIndex--; // Skip unavailable tracks const currentQueue = this.shuffleActive ? this.shuffledQueue : this.queue; - + if (recursiveCount > currentQueue.length) { console.error('All tracks in queue are unavailable.'); this.audio.pause(); diff --git a/js/ui.js b/js/ui.js index 1de252a..afdca72 100644 --- a/js/ui.js +++ b/js/ui.js @@ -246,7 +246,7 @@ export class UIRenderer {
${escapeHtml(trackArtists)}${yearDisplay}
-
${isUnavailable ? '--:--' : (track.duration ? formatTime(track.duration) : '--:--')}
+
${isUnavailable ? '--:--' : track.duration ? formatTime(track.duration) : '--:--'}
${actionsHTML}