mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
[bugfix/feat]: always fetch artist image for Navidrome (#317)
* [bugfix/feat]: always fetch artist image for Navidrome * Add error fallback to library header image --------- Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
parent
74cab01013
commit
452ef783f2
2 changed files with 19 additions and 7 deletions
|
|
@ -20,10 +20,6 @@ const getImageUrl = (args: { url: string | null }) => {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (url?.match('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
|
|
@ -186,7 +182,16 @@ const normalizeAlbumArtist = (
|
|||
},
|
||||
server: ServerListItem | null,
|
||||
): AlbumArtist => {
|
||||
const imageUrl = getImageUrl({ url: item?.largeImageUrl || null });
|
||||
let imageUrl = getImageUrl({ url: item?.largeImageUrl || null });
|
||||
|
||||
if (!imageUrl) {
|
||||
imageUrl = getCoverArtUrl({
|
||||
baseUrl: server?.url,
|
||||
coverArtId: `ar-${item.id}`,
|
||||
credential: server?.credential,
|
||||
size: 100,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
albumCount: item.albumCount,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue