The Free Software Media System - Server Backend & API
Add AlbumNormalizationGain field to BaseItemDto
HeroBrine1st Erquilenne9b00854e686c
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.csindex b392340f71..08ced387b8 100644--- a/Emby.Server.Implementations/Dto/DtoService.cs+++ b/Emby.Server.Implementations/Dto/DtoService.cs@@ -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))diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.csindex 8f223c12a5..e96bba0464 100644--- a/MediaBrowser.Model/Dto/BaseItemDto.cs+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs@@ -789,6 +789,12 @@ namespace MediaBrowser.Model.Dto/// <value>The gain required for audio normalization.</value>public float? NormalizationGain { get; set; }+ /// <summary>+ /// Gets or sets the gain required for audio normalization. This field is inherited from music album normalization gain.+ /// </summary>+ /// <value>The gain required for audio normalization.</value>+ public float? AlbumNormalizationGain { get; set; }+/// <summary>/// Gets or sets the current program./// </summary>