aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/Video/CleanDateTimeParser.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2020-01-11 20:25:06 +0100
committerBond_009 <bond.009@outlook.com>2020-01-11 22:17:05 +0100
commitb1dc595be1a7cf331702fd645b1441ac86afa464 (patch)
tree1978a00ac74c7a4eab62d4390b919c594aa88bb6 /Emby.Naming/Video/CleanDateTimeParser.cs
parenta647dc57052182a6171dae9ffba3026b66b26be7 (diff)
Fix a couple of tests
Diffstat (limited to 'Emby.Naming/Video/CleanDateTimeParser.cs')
-rw-r--r--Emby.Naming/Video/CleanDateTimeParser.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs
index a9db4cccc..9edb14a07 100644
--- a/Emby.Naming/Video/CleanDateTimeParser.cs
+++ b/Emby.Naming/Video/CleanDateTimeParser.cs
@@ -53,7 +53,7 @@ namespace Emby.Naming.Video
}
// Make a second pass, running clean string first
- var cleanStringResult = new CleanStringParser().Clean(name, _options.CleanStringRegexes);
+ var cleanStringResult = CleanStringParser.Clean(name, _options.CleanStringRegexes);
if (!cleanStringResult.HasChanged)
{
@@ -72,12 +72,12 @@ namespace Emby.Naming.Video
var match = expression.Match(name);
if (match.Success
- && match.Groups.Count == 4
+ && match.Groups.Count == 5
&& 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;
+ name = match.Groups[1].Value.TrimEnd();
result.Year = year;
result.HasChanged = true;
}