style: auto-fix linting issues
This commit is contained in:
parent
8eb8012cfc
commit
ed9ee3060a
6 changed files with 23 additions and 10 deletions
|
|
@ -677,7 +677,10 @@
|
||||||
</svg>
|
</svg>
|
||||||
<span id="select-local-folder-text">Select Music Folder</span>
|
<span id="select-local-folder-text">Select Music Folder</span>
|
||||||
</button>
|
</button>
|
||||||
<p id="local-browser-warning" style="display: none; color: #ef4444; margin-top: 10px; font-size: 0.9rem;">
|
<p
|
||||||
|
id="local-browser-warning"
|
||||||
|
style="display: none; color: #ef4444; margin-top: 10px; font-size: 0.9rem"
|
||||||
|
>
|
||||||
Please use Google Chrome or Microsoft Edge to play local files.
|
Please use Google Chrome or Microsoft Edge to play local files.
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-top: 10px; font-size: 0.9rem; color: var(--muted-foreground)">
|
<p style="margin-top: 10px; font-size: 0.9rem; color: var(--muted-foreground)">
|
||||||
|
|
|
||||||
|
|
@ -1031,17 +1031,17 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
const track = contextMenu._contextTrack;
|
const track = contextMenu._contextTrack;
|
||||||
const albumItem = contextMenu.querySelector('[data-action="go-to-album"]');
|
const albumItem = contextMenu.querySelector('[data-action="go-to-album"]');
|
||||||
const artistItem = contextMenu.querySelector('[data-action="go-to-artist"]');
|
const artistItem = contextMenu.querySelector('[data-action="go-to-artist"]');
|
||||||
|
|
||||||
if (track) {
|
if (track) {
|
||||||
if (albumItem) {
|
if (albumItem) {
|
||||||
let label = 'Album';
|
let label = 'Album';
|
||||||
const albumType = track.album?.type?.toUpperCase();
|
const albumType = track.album?.type?.toUpperCase();
|
||||||
const trackCount = track.album?.numberOfTracks;
|
const trackCount = track.album?.numberOfTracks;
|
||||||
|
|
||||||
if (albumType === 'SINGLE' || trackCount === 1) label = 'Single';
|
if (albumType === 'SINGLE' || trackCount === 1) label = 'Single';
|
||||||
else if (albumType === 'EP') label = 'EP';
|
else if (albumType === 'EP') label = 'EP';
|
||||||
else if (trackCount && trackCount <= 6) label = 'EP';
|
else if (trackCount && trackCount <= 6) label = 'EP';
|
||||||
|
|
||||||
albumItem.textContent = `Go to ${label}`;
|
albumItem.textContent = `Go to ${label}`;
|
||||||
albumItem.style.display = track.album ? 'block' : 'none';
|
albumItem.style.display = track.album ? 'block' : 'none';
|
||||||
}
|
}
|
||||||
|
|
@ -1054,7 +1054,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
observer.observe(contextMenu, { attributes: true });
|
observer.observe(contextMenu, { attributes: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -261,4 +261,4 @@ export class LastFMScrobbler {
|
||||||
this.clearScrobbleTimer();
|
this.clearScrobbleTimer();
|
||||||
this.currentTrack = null;
|
this.currentTrack = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -426,12 +426,12 @@ export class Player {
|
||||||
if (this.shuffleActive) {
|
if (this.shuffleActive) {
|
||||||
this.originalQueueBeforeShuffle = [...this.queue];
|
this.originalQueueBeforeShuffle = [...this.queue];
|
||||||
const currentTrack = this.queue[this.currentQueueIndex];
|
const currentTrack = this.queue[this.currentQueueIndex];
|
||||||
|
|
||||||
const tracksToShuffle = [...this.queue];
|
const tracksToShuffle = [...this.queue];
|
||||||
if (currentTrack && this.currentQueueIndex >= 0) {
|
if (currentTrack && this.currentQueueIndex >= 0) {
|
||||||
tracksToShuffle.splice(this.currentQueueIndex, 1);
|
tracksToShuffle.splice(this.currentQueueIndex, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
tracksToShuffle.sort(() => Math.random() - 0.5);
|
tracksToShuffle.sort(() => Math.random() - 0.5);
|
||||||
|
|
||||||
if (currentTrack) {
|
if (currentTrack) {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,12 @@ export const apiSettings = {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to load instances from GitHub:', error);
|
console.error('Failed to load instances from GitHub:', error);
|
||||||
this.defaultInstances = {
|
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: [
|
streaming: [
|
||||||
'https://triton.squid.wtf',
|
'https://triton.squid.wtf',
|
||||||
'https://wolf.qqdl.site',
|
'https://wolf.qqdl.site',
|
||||||
|
|
|
||||||
|
|
@ -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": [
|
"streaming": [
|
||||||
"https://triton.squid.wtf",
|
"https://triton.squid.wtf",
|
||||||
"https://wolf.qqdl.site",
|
"https://wolf.qqdl.site",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue