add a fallback image to the dynamic background url
This commit is contained in:
parent
65eca32de3
commit
f7c6088cca
1 changed files with 2 additions and 4 deletions
|
@ -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 (
|
||||||
|
|
Reference in a new issue