mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
add a fallback image to the dynamic background url
This commit is contained in:
@@ -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 New Issue
Block a user