aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
diff options
context:
space:
mode:
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;
}