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,
|
||||
});
|
||||
|
||||
const imageUrl = currentSong?.imageUrl;
|
||||
const imageUrl = currentSong?.imageUrl && currentSong.imageUrl.replace(/size=\d+/g, 'size=500');
|
||||
const backgroundImage =
|
||||
imageUrl && dynamicIsImage
|
||||
? `url("${imageUrl
|
||||
.replace(/size=\d+/g, 'size=500')
|
||||
.replace(currentSong.id, currentSong.albumId)}`
|
||||
? `url("${imageUrl.replace(currentSong.id, currentSong.albumId)}"), url("${imageUrl}")`
|
||||
: mainBackground;
|
||||
|
||||
return (
|
||||
|
|
Reference in a new issue