Merge branch 'main' of github.com:monochrome-music/monochrome
This commit is contained in:
commit
f576b35ce8
5 changed files with 11 additions and 7 deletions
|
|
@ -202,7 +202,8 @@ export function initializePlayerEvents(player, audioPlayer, scrobbler, ui) {
|
||||||
console.error(`Media playback error (${element.id}):`, errorMsg, e);
|
console.error(`Media playback error (${element.id}):`, errorMsg, e);
|
||||||
playPauseBtn.innerHTML = SVG_PLAY;
|
playPauseBtn.innerHTML = SVG_PLAY;
|
||||||
|
|
||||||
const canFallback = player.quality === 'HI_RES_LOSSLESS' &&
|
const canFallback =
|
||||||
|
player.quality === 'HI_RES_LOSSLESS' &&
|
||||||
errorMsg.includes('Source not supported') &&
|
errorMsg.includes('Source not supported') &&
|
||||||
errorMsg.includes('0x80004005') &&
|
errorMsg.includes('0x80004005') &&
|
||||||
!player.isFallbackRetry;
|
!player.isFallbackRetry;
|
||||||
|
|
|
||||||
|
|
@ -1047,9 +1047,8 @@ export class Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
const shuffledSeeds = [...this.radioSeeds].sort(() => 0.5 - Math.random());
|
const shuffledSeeds = [...this.radioSeeds].sort(() => 0.5 - Math.random());
|
||||||
const seeds = shuffledSeeds.length > 0
|
const seeds =
|
||||||
? shuffledSeeds.slice(0, 5)
|
shuffledSeeds.length > 0 ? shuffledSeeds.slice(0, 5) : this.currentTrack ? [this.currentTrack] : [];
|
||||||
: this.currentTrack ? [this.currentTrack] : [];
|
|
||||||
|
|
||||||
if (seeds.length === 0) {
|
if (seeds.length === 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1068,7 +1067,7 @@ export class Player {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const recommendations = await this.api.getRecommendedTracksForPlaylist(seeds, 20, {
|
const recommendations = await this.api.getRecommendedTracksForPlaylist(seeds, 20, {
|
||||||
knownTrackIds: knownTrackIds
|
knownTrackIds: knownTrackIds,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (recommendations && recommendations.length > 0) {
|
if (recommendations && recommendations.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -2273,6 +2273,9 @@ export function initializeSettings(scrobbler, player, api, ui) {
|
||||||
ui.visualizer.setPreset(val);
|
ui.visualizer.setPreset(val);
|
||||||
}
|
}
|
||||||
updateButterchurnSettingsVisibility();
|
updateButterchurnSettingsVisibility();
|
||||||
|
|
||||||
|
//Since changing the preset breaks the visualizer, a location.reload() is added to make sure that it works
|
||||||
|
window.location.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,8 @@ export class LCDPreset {
|
||||||
this.initWebGL(width, height);
|
this.initWebGL(width, height);
|
||||||
// Attach WebGL canvas to same parent as main canvas
|
// Attach WebGL canvas to same parent as main canvas
|
||||||
if (this.glCanvas && canvas.parentElement) {
|
if (this.glCanvas && canvas.parentElement) {
|
||||||
canvas.parentElement.style.position = 'relative';
|
//This position:relative was causing the visual bugs and problems in the lcd visualiser.
|
||||||
|
// canvas.parentElement.style.position = 'relative';
|
||||||
canvas.parentElement.appendChild(this.glCanvas);
|
canvas.parentElement.appendChild(this.glCanvas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7589,7 +7589,7 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn {
|
||||||
|
|
||||||
/* EQ Response Curve Canvas */
|
/* EQ Response Curve Canvas */
|
||||||
.eq-response-canvas {
|
.eq-response-canvas {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
top: var(--spacing-md);
|
top: var(--spacing-md);
|
||||||
left: 4px;
|
left: 4px;
|
||||||
width: calc(100% - 8px);
|
width: calc(100% - 8px);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue