From e37931b0da09038c1591d2ba14736ec9bbe40162 Mon Sep 17 00:00:00 2001 From: Joseph Milazzo Date: Thu, 6 May 2021 16:51:16 -0500 Subject: [PATCH] Regex addition (#200) --- API.Tests/Parser/MangaParserTests.cs | 1 + API/Parser/Parser.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/API.Tests/Parser/MangaParserTests.cs b/API.Tests/Parser/MangaParserTests.cs index 9b6a08aee..fa932dfeb 100644 --- a/API.Tests/Parser/MangaParserTests.cs +++ b/API.Tests/Parser/MangaParserTests.cs @@ -136,6 +136,7 @@ namespace API.Tests.Parser [InlineData("NEEDLESS_Vol.4_-_Simeon_6_v2_[SugoiSugoi].rar", "NEEDLESS")] [InlineData("Okusama wa Shougakusei c003 (v01) [bokuwaNEET]", "Okusama wa Shougakusei")] [InlineData("VanDread-v01-c001[MD].zip", "VanDread")] + [InlineData("Momo The Blood Taker - Chapter 027 Violent Emotion.cbz", "Momo The Blood Taker")] public void ParseSeriesTest(string filename, string expected) { Assert.Equal(expected, API.Parser.Parser.ParseSeries(filename)); diff --git a/API/Parser/Parser.cs b/API/Parser/Parser.cs index f6a4e13e5..29d584954 100644 --- a/API/Parser/Parser.cs +++ b/API/Parser/Parser.cs @@ -90,6 +90,10 @@ namespace API.Parser new Regex( @"(?.*)(?: _|-|\[|\() ?v", RegexOptions.IgnoreCase | RegexOptions.Compiled), + // Momo The Blood Taker - Chapter 027 Violent Emotion.cbz + new Regex( + @"(?.*) (\b|_|-)(?:chapter)", + RegexOptions.IgnoreCase | RegexOptions.Compiled), // Historys Strongest Disciple Kenichi_v11_c90-98.zip, Killing Bites Vol. 0001 Ch. 0001 - Galactica Scanlations (gb) new Regex( @"(?.*) (\b|_|-)v",