Merge branch 'main' of github.com:SamidyFR/monochrome

This commit is contained in:
Samidy 2026-01-17 22:40:47 +03:00
commit 3162679411
6 changed files with 23 additions and 10 deletions

View file

@ -740,7 +740,10 @@
</svg>
<span id="select-local-folder-text">Select Music Folder</span>
</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.
</p>
<p style="margin-top: 10px; font-size: 0.9rem; color: var(--muted-foreground)">

View file

@ -1052,17 +1052,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';
}
@ -1075,7 +1075,7 @@ document.addEventListener('DOMContentLoaded', async () => {
}
});
});
observer.observe(contextMenu, { attributes: true });
}
});

View file

@ -261,4 +261,4 @@ export class LastFMScrobbler {
this.clearScrobbleTimer();
this.currentTrack = null;
}
}
}

View file

@ -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) {

View file

@ -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',

View file

@ -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",