mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
fix missing playlistItemId for subsonic song normalization (#1564)
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user