use exact album artist names (#1459)

This commit is contained in:
jeffvli
2025-12-30 03:39:53 -08:00
parent aa75aaaffb
commit 6aa3905922
11 changed files with 138 additions and 140 deletions
@@ -145,6 +145,7 @@ const normalizeSong = (
_serverId: server?.id || '',
_serverType: ServerType.JELLYFIN,
album: item.Album,
albumArtistName: item.AlbumArtist || '',
albumArtists: item.AlbumArtists?.map((entry) => ({
id: entry.Id,
imageId: entry.Id,
@@ -154,7 +155,7 @@ const normalizeSong = (
userRating: null,
})),
albumId: item.AlbumId || `dummy/${item.Id}`,
artistName: item?.ArtistItems?.[0]?.Name || item?.AlbumArtists?.[0]?.Name,
artistName: item?.ArtistItems?.map((entry) => entry.Name).join(', ') || '',
artists: (item?.ArtistItems?.length ? item.ArtistItems : item.AlbumArtists)?.map(
(entry) => ({
id: entry.Id,
@@ -231,7 +232,7 @@ const normalizeAlbum = (
_itemType: LibraryItem.ALBUM,
_serverId: server?.id || '',
_serverType: ServerType.JELLYFIN,
albumArtist: item.AlbumArtist,
albumArtistName: item.AlbumArtist || '',
albumArtists:
item.AlbumArtists.map((entry) => ({
id: entry.Id,
@@ -158,6 +158,7 @@ const normalizeSong = (
_itemType: LibraryItem.SONG,
_serverId: server?.id || 'unknown',
_serverType: ServerType.NAVIDROME,
albumArtistName: item.albumArtist,
artistName: item.artist,
bitDepth: item.bitDepth || null,
bitRate: item.bitRate,
@@ -273,7 +274,7 @@ const normalizeAlbum = (
_itemType: LibraryItem.ALBUM,
_serverId: server?.id || 'unknown',
_serverType: ServerType.NAVIDROME,
albumArtist: item.albumArtist,
albumArtistName: item.albumArtist,
comment: item.comment || null,
createdAt: item.createdAt,
duration: item.duration !== undefined ? item.duration * 1000 : null,
@@ -123,6 +123,7 @@ const normalizeSong = (
_serverId: server?.id || 'unknown',
_serverType: ServerType.SUBSONIC,
album: item.album || '',
albumArtistName: item.artist || '',
albumArtists: getArtistList(item.albumArtists, item.artistId, item.artist),
albumId: item.albumId?.toString() || '',
artistName: item.artist || '',
@@ -247,7 +248,7 @@ const normalizeAlbum = (
_itemType: LibraryItem.ALBUM,
_serverId: server?.id || 'unknown',
_serverType: ServerType.SUBSONIC,
albumArtist: item.artist,
albumArtistName: item.artist,
albumArtists: getArtistList(item.artists, item.artistId, item.artist),
artists: [],
comment: null,
+2 -1
View File
@@ -171,7 +171,7 @@ export type Album = {
_itemType: LibraryItem.ALBUM;
_serverId: string;
_serverType: ServerType;
albumArtist: string;
albumArtistName: string;
albumArtists: RelatedArtist[];
artists: RelatedArtist[];
comment: null | string;
@@ -366,6 +366,7 @@ export type Song = {
_serverId: string;
_serverType: ServerType;
album: null | string;
albumArtistName: string;
albumArtists: RelatedArtist[];
albumId: string;
artistName: string;