style: auto-fix linting issues
This commit is contained in:
parent
baeff12c54
commit
716a1b7b05
5 changed files with 5 additions and 10 deletions
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -1022,7 +1022,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
content.scrollTop = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Reset flag
|
||||
isGoingBack = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
2
js/ui.js
2
js/ui.js
|
|
@ -246,7 +246,7 @@ export class UIRenderer {
|
|||
<div class="artist">${escapeHtml(trackArtists)}${yearDisplay}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="track-item-duration">${isUnavailable ? '--:--' : (track.duration ? formatTime(track.duration) : '--:--')}</div>
|
||||
<div class="track-item-duration">${isUnavailable ? '--:--' : track.duration ? formatTime(track.duration) : '--:--'}</div>
|
||||
<div class="track-item-actions">
|
||||
${actionsHTML}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue