diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-19 15:11:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-19 15:11:50 -0500 |
| commit | 55538764fa06a64795c099fc6496df9dbb4156bd (patch) | |
| tree | 8c1f94861ecebdf634b70a7265945b6f8f13aff1 /Emby.Naming/AudioBook/AudioBookFilePathParser.cs | |
| parent | 3b52035ee064a5d9aa215d9515211d4508585d39 (diff) | |
| parent | c5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff) | |
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
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; } |
