aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-01-22 18:13:47 -0500
committerGitHub <noreply@github.com>2019-01-22 18:13:47 -0500
commit28483bdb54be96ae83e0fded097f534d7e26ba1e (patch)
treee7f4b92326417ebf55eecdf68a01d2c3b9e660d7 /Emby.Naming/AudioBook/AudioBookFilePathParser.cs
parent920c39454c05e979eabe81877269cd4517a03ccf (diff)
parent8106c8393b711a7e1d40487e3caf2b014decbe28 (diff)
Merge pull request #651 from jellyfin/release-10.1.0
Release 10.1.0
Diffstat (limited to 'Emby.Naming/AudioBook/AudioBookFilePathParser.cs')
-rw-r--r--Emby.Naming/AudioBook/AudioBookFilePathParser.cs13
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;
}