aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/Video/CleanDateTimeParser.cs
diff options
context:
space:
mode:
authorLogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>2019-01-23 00:31:35 -0800
committerGitHub <noreply@github.com>2019-01-23 00:31:35 -0800
commit404bd04cbc17dc8c8bf4a5c9aa3ca9c5cd85aa68 (patch)
tree3d267c6ceef9439a034c113095e10e4d619e7c70 /Emby.Naming/Video/CleanDateTimeParser.cs
parent8ff89fdc0c30f595a171ffc550f907ef22b6212a (diff)
parente05e002b8bb4d13eb2b80b56a0aad8903ddb701e (diff)
Merge pull request #8 from jellyfin/master
rebase to latest master
Diffstat (limited to 'Emby.Naming/Video/CleanDateTimeParser.cs')
-rw-r--r--Emby.Naming/Video/CleanDateTimeParser.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs
index 572dd1c60..74807ef53 100644
--- a/Emby.Naming/Video/CleanDateTimeParser.cs
+++ b/Emby.Naming/Video/CleanDateTimeParser.cs
@@ -1,9 +1,9 @@
-using System;
-using Emby.Naming.Common;
+using System;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
+using Emby.Naming.Common;
namespace Emby.Naming.Video
{
@@ -38,7 +38,7 @@ namespace Emby.Naming.Video
}
catch (ArgumentException)
{
-
+
}
var result = _options.CleanDateTimeRegexes.Select(i => Clean(name, i))
@@ -63,7 +63,7 @@ namespace Emby.Naming.Video
result;
}
- private CleanDateTimeResult Clean(string name, Regex expression)
+ private static CleanDateTimeResult Clean(string name, Regex expression)
{
var result = new CleanDateTimeResult();
@@ -71,8 +71,7 @@ namespace Emby.Naming.Video
if (match.Success && match.Groups.Count == 4)
{
- int year;
- if (match.Groups[1].Success && match.Groups[2].Success && int.TryParse(match.Groups[2].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out year))
+ if (match.Groups[1].Success && match.Groups[2].Success && int.TryParse(match.Groups[2].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var year))
{
name = match.Groups[1].Value;
result.Year = year;