diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-02-20 16:07:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-20 08:07:51 -0700 |
| commit | 5b493e14accd6cd8b10b5a14b15e105f73a2724e (patch) | |
| tree | 196324ef4f51516516945d8e33b7b29ebdf45e1d /Emby.Naming/AudioBook | |
| parent | e7a7edbac02f1cc0818b3f3614f55e579733905e (diff) | |
Improve alternate ordering (#9336)
Diffstat (limited to 'Emby.Naming/AudioBook')
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookFilePathParser.cs | 2 | ||||
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookNameParser.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs index 219599d56..75fdedfea 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs @@ -32,7 +32,7 @@ namespace Emby.Naming.AudioBook var fileName = Path.GetFileNameWithoutExtension(path); foreach (var expression in _options.AudioBookPartsExpressions) { - var match = new Regex(expression, RegexOptions.IgnoreCase).Match(fileName); + var match = Regex.Match(fileName, expression, RegexOptions.IgnoreCase); if (match.Success) { if (!result.ChapterNumber.HasValue) diff --git a/Emby.Naming/AudioBook/AudioBookNameParser.cs b/Emby.Naming/AudioBook/AudioBookNameParser.cs index f49c3f0e7..5ea649dbf 100644 --- a/Emby.Naming/AudioBook/AudioBookNameParser.cs +++ b/Emby.Naming/AudioBook/AudioBookNameParser.cs @@ -30,7 +30,7 @@ namespace Emby.Naming.AudioBook AudioBookNameParserResult result = default; foreach (var expression in _options.AudioBookNamesExpressions) { - var match = new Regex(expression, RegexOptions.IgnoreCase).Match(name); + var match = Regex.Match(name, expression, RegexOptions.IgnoreCase); if (match.Success) { if (result.Name is null) |
