mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-05 18:01:55 +01:00
Add AlbumNormalizationGain field to BaseItemDto
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user