Merge pull request #11457 from Bond-009/audionormalization

This commit is contained in:
Cody Robibero
2024-04-30 13:15:51 -06:00
committed by GitHub
11 changed files with 232 additions and 69 deletions

View File

@@ -183,14 +183,13 @@ namespace MediaBrowser.Controller.Entities.Audio
progress.Report(percent * 95);
}
// get album LUFS
LUFS = items.OfType<Audio>().Max(item => item.LUFS);
var parentRefreshOptions = refreshOptions;
if (childUpdateType > ItemUpdateType.None)
{
parentRefreshOptions = new MetadataRefreshOptions(refreshOptions);
parentRefreshOptions.MetadataRefreshMode = MetadataRefreshMode.FullRefresh;
parentRefreshOptions = new MetadataRefreshOptions(refreshOptions)
{
MetadataRefreshMode = MetadataRefreshMode.FullRefresh
};
}
// Refresh current item

View File

@@ -137,6 +137,13 @@ namespace MediaBrowser.Controller.Entities
[JsonIgnore]
public float? LUFS { get; set; }
/// <summary>
/// Gets or sets the gain required for audio normalization.
/// </summary>
/// <value>The gain required for audio normalization.</value>
[JsonIgnore]
public float? NormalizationGain { get; set; }
/// <summary>
/// Gets or sets the channel identifier.
/// </summary>