aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
diff options
context:
space:
mode:
authorTthecreator <epostvanthomas@kpnmail.nl>2019-01-22 15:22:42 +0000
committerGitHub <noreply@github.com>2019-01-22 15:22:42 +0000
commit189b99df16bd4c93cc96422d7282d01d9ff5b82f (patch)
tree26d7da95fe3e3b2772b8b39a2463a6c0ac7652fc /Emby.Naming/AudioBook/AudioBookFilePathParser.cs
parenta00c0defa8cb22774f5dc8a7d566eb36ac7307e8 (diff)
parentedcfd8b565f632088c8b1f826db8e2fbecf9790d (diff)
Merge pull request #1 from jellyfin/dev
Update from jellyfin repo
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;
}