Merge pull request #14745 from HeroBrine1st/master

Add AlbumNormalizationGain field to BaseItemDto
This commit is contained in:
Bond-009
2026-04-05 16:38:35 +02:00
committed by GitHub
2 changed files with 15 additions and 0 deletions

View File

@@ -1019,6 +1019,15 @@ namespace Emby.Server.Implementations.Dto
{
dto.AlbumId = albumParent.Id;
dto.AlbumPrimaryImageTag = GetTagAndFillBlurhash(dto, albumParent, ImageType.Primary);
if (albumParent.LUFS.HasValue)
{
// -18 LUFS reference, same as ReplayGain 2.0, compatible with ReplayGain 1.0
dto.AlbumNormalizationGain = -18f - albumParent.LUFS;
}
else if (albumParent.NormalizationGain.HasValue)
{
dto.AlbumNormalizationGain = albumParent.NormalizationGain;
}
}
// if (options.ContainsField(ItemFields.MediaSourceCount))