fix missing playlistItemId for subsonic song normalization (#1564)

This commit is contained in:
jeffvli
2026-01-18 02:28:31 -08:00
parent 0e388dabf5
commit a0e09b80cf
2 changed files with 4 additions and 1 deletions
@@ -1056,12 +1056,13 @@ export const SubsonicController: InternalControllerEndpoint = {
} }
const items = const items =
res.body.playlist.entry?.map((song) => res.body.playlist.entry?.map((song, index) =>
ssNormalize.song( ssNormalize.song(
song, song,
apiClientProps.server, apiClientProps.server,
context?.pathReplace, context?.pathReplace,
context?.pathReplaceWith, context?.pathReplaceWith,
index,
), ),
) || []; ) || [];
@@ -133,6 +133,7 @@ const normalizeSong = (
server?: null | ServerListItemWithCredential, server?: null | ServerListItemWithCredential,
pathReplace?: string, pathReplace?: string,
pathReplaceWith?: string, pathReplaceWith?: string,
playlistIndex?: number,
): Song => { ): Song => {
const participants = getParticipants(item); const participants = getParticipants(item);
@@ -189,6 +190,7 @@ const normalizeSong = (
} }
: null, : null,
playCount: item?.playCount || 0, playCount: item?.playCount || 0,
playlistItemId: playlistIndex !== undefined ? playlistIndex.toString() : undefined,
releaseDate: null, releaseDate: null,
releaseYear: item.year || null, releaseYear: item.year || null,
sampleRate: item.samplingRate || null, sampleRate: item.samplingRate || null,