mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-17 03:33:46 +01:00
Improve audio normalization
* Move calculation of LUFS to a scheduled task as it's pretty slow * Correctly calculate album LUFS * Don't try to convert replaygain tags to LUFS values
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user