diff options
| author | LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> | 2019-01-23 00:31:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-23 00:31:35 -0800 |
| commit | 404bd04cbc17dc8c8bf4a5c9aa3ca9c5cd85aa68 (patch) | |
| tree | 3d267c6ceef9439a034c113095e10e4d619e7c70 /Emby.Naming/AudioBook/AudioBookFilePathParser.cs | |
| parent | 8ff89fdc0c30f595a171ffc550f907ef22b6212a (diff) | |
| parent | e05e002b8bb4d13eb2b80b56a0aad8903ddb701e (diff) | |
Merge pull request #8 from jellyfin/master
rebase to latest master
Diffstat (limited to 'Emby.Naming/AudioBook/AudioBookFilePathParser.cs')
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookFilePathParser.cs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs index b4805edd2..590979794 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs @@ -1,12 +1,7 @@ -using System; -using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Linq; -using System.Text; using System.Text.RegularExpressions; using Emby.Naming.Common; -using Emby.Naming.TV; namespace Emby.Naming.AudioBook { @@ -21,7 +16,7 @@ namespace Emby.Naming.AudioBook public AudioBookFilePathParserResult Parse(string path, bool IsDirectory) { - AudioBookFilePathParserResult result = Parse(path); + var result = Parse(path); return !result.Success ? new AudioBookFilePathParserResult() : result; } @@ -39,8 +34,7 @@ namespace Emby.Naming.AudioBook var value = match.Groups["chapter"]; if (value.Success) { - int intValue; - if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out intValue)) + if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue)) { result.ChapterNumber = intValue; } @@ -51,8 +45,7 @@ namespace Emby.Naming.AudioBook var value = match.Groups["part"]; if (value.Success) { - int intValue; - if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out intValue)) + if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue)) { result.ChapterNumber = intValue; } |
