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,11 +153,16 @@ const normalizeSong = (
discNumber: (item.ParentIndexNumber && item.ParentIndexNumber) || 1,
discSubtitle: null,
duration: item.RunTimeTicks / 10000,
gain: item.LUFS
? {
track: -18 - item.LUFS,
}
: null,
gain:
item.NormalizationGain !== undefined
? {
track: item.NormalizationGain,
}
: item.LUFS
? {
track: -18 - item.LUFS,
}
: null,
genres: item.GenreItems?.map((entry) => ({
id: entry.Id,
imageUrl: null,