diff options
| author | Christopher Young <c.t.ythegamer@gmail.com> | 2025-11-08 07:31:02 -0700 |
|---|---|---|
| committer | Christopher Young <c.t.ythegamer@gmail.com> | 2025-11-08 07:31:02 -0700 |
| commit | 4cb038574515590611af081b5fe341ff4cb840b2 (patch) | |
| tree | 847f90cd0fd7db9b7845d0afafdabedd3ecf3b74 /Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationTask.cs | |
| parent | 438d992c8b0522f6a17f437ee991c8ef6808d749 (diff) | |
| parent | 1adf441f1ca9d61c3d6c63df0ea87a870e03632f (diff) | |
Merge branch 'master' of https://github.com/JadedRain/jellyfin
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationTask.cs')
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationTask.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationTask.cs index a28f280afd..36708e2582 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationTask.cs @@ -261,14 +261,22 @@ public partial class AudioNormalizationTask : IScheduledTask using var reader = process.StandardError; float? lufs = null; + var foundLufs = false; await foreach (var line in reader.ReadAllLinesAsync(cancellationToken).ConfigureAwait(false)) { + if (foundLufs) + { + continue; + } + Match match = LUFSRegex().Match(line); - if (match.Success) + if (!match.Success) { - lufs = float.Parse(match.Groups[1].ValueSpan, CultureInfo.InvariantCulture.NumberFormat); - break; + continue; } + + lufs = float.Parse(match.Groups[1].ValueSpan, CultureInfo.InvariantCulture.NumberFormat); + foundLufs = true; } if (lufs is null) |
