mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-16 16:34:24 +02:00
fix album artist name in Subsonic song normalization
This commit is contained in:
@@ -137,14 +137,19 @@ const normalizeSong = (
|
|||||||
discTitleMap?: Map<number, string>,
|
discTitleMap?: Map<number, string>,
|
||||||
): Song => {
|
): Song => {
|
||||||
const participants = getParticipants(item);
|
const participants = getParticipants(item);
|
||||||
|
const albumArtistsList = getArtistList(item.albumArtists, item.artistId, item.artist);
|
||||||
|
const albumArtistName =
|
||||||
|
item.albumArtists?.length > 0
|
||||||
|
? item.albumArtists.map((a) => a.name).join(', ')
|
||||||
|
: item.artist || '';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_itemType: LibraryItem.SONG,
|
_itemType: LibraryItem.SONG,
|
||||||
_serverId: server?.id || 'unknown',
|
_serverId: server?.id || 'unknown',
|
||||||
_serverType: ServerType.SUBSONIC,
|
_serverType: ServerType.SUBSONIC,
|
||||||
album: item.album || '',
|
album: item.album || '',
|
||||||
albumArtistName: item.artist || '',
|
albumArtistName,
|
||||||
albumArtists: getArtistList(item.albumArtists, item.artistId, item.artist),
|
albumArtists: albumArtistsList,
|
||||||
albumId: item.albumId?.toString() || '',
|
albumId: item.albumId?.toString() || '',
|
||||||
artistName: item.artist || '',
|
artistName: item.artist || '',
|
||||||
artists: getArtistList(item.artists, item.artistId, item.artist, participants),
|
artists: getArtistList(item.artists, item.artistId, item.artist, participants),
|
||||||
|
|||||||
Reference in New Issue
Block a user