aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Providers/MediaInfo/AudioFileProber.cs')
-rw-r--r--MediaBrowser.Providers/MediaInfo/AudioFileProber.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs
index e1dcbc993..a7e8f774c 100644
--- a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs
+++ b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs
@@ -25,7 +25,7 @@ namespace MediaBrowser.Providers.MediaInfo
/// <summary>
/// Probes audio files for metadata.
/// </summary>
- public class AudioFileProber
+ public partial class AudioFileProber
{
// Default LUFS value for use with the web interface, at -18db gain will be 1(no db gain).
private const float DefaultLUFSValue = -18;
@@ -58,6 +58,9 @@ namespace MediaBrowser.Providers.MediaInfo
_mediaSourceManager = mediaSourceManager;
}
+ [GeneratedRegex("I:\\s+(.*?)\\s+LUFS")]
+ private static partial Regex LUFSRegex();
+
/// <summary>
/// Probes the specified item for metadata.
/// </summary>
@@ -129,7 +132,7 @@ namespace MediaBrowser.Providers.MediaInfo
output = await process.StandardError.ReadToEndAsync(cancellationToken).ConfigureAwait(false);
cancellationToken.ThrowIfCancellationRequested();
- MatchCollection split = Regex.Matches(output, @"I:\s+(.*?)\s+LUFS");
+ MatchCollection split = LUFSRegex().Matches(output);
if (split.Count != 0)
{