add track normalization for jellyfin as well

This commit is contained in:
Kendall Garner 2024-09-09 07:15:26 -07:00
parent fcc010eb54
commit e2a05f4204
No known key found for this signature in database
GPG Key ID: 18D2767419676C87
2 changed files with 11 additions and 5 deletions

View File

@ -153,7 +153,12 @@ const normalizeSong = (
discNumber: (item.ParentIndexNumber && item.ParentIndexNumber) || 1,
discSubtitle: null,
duration: item.RunTimeTicks / 10000,
gain: item.LUFS
gain:
item.NormalizationGain !== undefined
? {
track: item.NormalizationGain,
}
: item.LUFS
? {
track: -18 - item.LUFS,
}

View File

@ -413,6 +413,7 @@ const song = z.object({
MediaSources: z.array(mediaSources),
MediaType: z.string(),
Name: z.string(),
NormalizationGain: z.number().optional(),
ParentIndexNumber: z.number(),
PlaylistItemId: z.string().optional(),
PremiereDate: z.string().optional(),