add a fallback image to the dynamic background url

This commit is contained in:
iiPython 2024-04-02 12:56:36 -05:00
parent 65eca32de3
commit f7c6088cca
No known key found for this signature in database

View file

@ -472,12 +472,10 @@ export const FullScreenPlayer = () => {
srcLoaded: true, srcLoaded: true,
}); });
const imageUrl = currentSong?.imageUrl; const imageUrl = currentSong?.imageUrl && currentSong.imageUrl.replace(/size=\d+/g, 'size=500');
const backgroundImage = const backgroundImage =
imageUrl && dynamicIsImage imageUrl && dynamicIsImage
? `url("${imageUrl ? `url("${imageUrl.replace(currentSong.id, currentSong.albumId)}"), url("${imageUrl}")`
.replace(/size=\d+/g, 'size=500')
.replace(currentSong.id, currentSong.albumId)}`
: mainBackground; : mainBackground;
return ( return (