mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
add fallback to album artist if no artists in Jellyfin response (#1329)
This commit is contained in:
@@ -203,12 +203,14 @@ const normalizeSong = (
|
|||||||
name: entry.Name,
|
name: entry.Name,
|
||||||
})),
|
})),
|
||||||
albumId: item.AlbumId || `dummy/${item.Id}`,
|
albumId: item.AlbumId || `dummy/${item.Id}`,
|
||||||
artistName: item?.ArtistItems?.[0]?.Name,
|
artistName: item?.ArtistItems?.[0]?.Name || item?.AlbumArtists?.[0]?.Name,
|
||||||
artists: item?.ArtistItems?.map((entry) => ({
|
artists: (item?.ArtistItems?.length ? item.ArtistItems : item.AlbumArtists)?.map(
|
||||||
|
(entry) => ({
|
||||||
id: entry.Id,
|
id: entry.Id,
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
name: entry.Name,
|
name: entry.Name,
|
||||||
})),
|
}),
|
||||||
|
),
|
||||||
bitDepth: null,
|
bitDepth: null,
|
||||||
bitRate,
|
bitRate,
|
||||||
bpm: null,
|
bpm: null,
|
||||||
@@ -286,11 +288,13 @@ const normalizeAlbum = (
|
|||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
name: entry.Name,
|
name: entry.Name,
|
||||||
})) || [],
|
})) || [],
|
||||||
artists: item.ArtistItems?.map((entry) => ({
|
artists: (item.ArtistItems?.length ? item.ArtistItems : item.AlbumArtists)?.map(
|
||||||
|
(entry) => ({
|
||||||
id: entry.Id,
|
id: entry.Id,
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
name: entry.Name,
|
name: entry.Name,
|
||||||
})),
|
}),
|
||||||
|
),
|
||||||
backdropImageUrl: null,
|
backdropImageUrl: null,
|
||||||
comment: null,
|
comment: null,
|
||||||
createdAt: item.DateCreated,
|
createdAt: item.DateCreated,
|
||||||
|
|||||||
Reference in New Issue
Block a user