Skip to content

Commit

Permalink
Fix service logos
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalopitz committed Mar 27, 2024
1 parent 7ca7f5c commit cb84bdb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/common/helpers/getServiceLogoUrl.js
Expand Up @@ -21,18 +21,15 @@ export default function getServiceLogoUrl(id) {
}

const encodedId = String(7 + Number(id) * 256);
const match = ServiceImageMap.presentationmap.service.find(
const match = ServiceImageMap.sized.service.find(
(i) => i.id == encodedId
);

const attBrandMark = (match?.image || []).find(
(i) => i.placement === 'AttributionBrandmark'
)?._;
const brandLogo = (match?.image || []).find(
(i) => i.placement === 'BrandLogo-v2'
const square = (match?.image || []).find(
(i) => i.placement === 'square'
)?._;

return attBrandMark || brandLogo;
return square;
} catch (e) {
console.log(e);
}
Expand Down
2 changes: 2 additions & 0 deletions src/ui/components/AlbumArt.jsx
Expand Up @@ -213,6 +213,8 @@ export const AlbumArt = (props) => {
const css = {
backgroundImage: `url("${srcUrl}")`,
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
};

return (
Expand Down
Expand Up @@ -7,6 +7,6 @@ exports[`AlbumArt renders and matches snapshot 1`] = `
data-loaded="false"
data-loading="false"
data-src-prop="foo"
style="background-image:url(\\"images/browse_missing_album_art.png\\");background-size:contain"
style="background-image:url(\\"images/browse_missing_album_art.png\\");background-size:contain;background-repeat:no-repeat;background-position:center"
/>
`;

0 comments on commit cb84bdb

Please sign in to comment.