Skip to content

Commit

Permalink
Merge pull request #571 from iiPythonx/dynamicbg
Browse files Browse the repository at this point in the history
[bugfix]: Add a fallback image to the dynamic background url
  • Loading branch information
kgarner7 authored Apr 3, 2024
2 parents 65eca32 + f7c6088 commit 24394fa
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 24394fa

Please sign in to comment.