diff --git a/API.Tests/Parser/MangaParserTests.cs b/API.Tests/Parser/MangaParserTests.cs index bba6f60e8..2ec34318a 100644 --- a/API.Tests/Parser/MangaParserTests.cs +++ b/API.Tests/Parser/MangaParserTests.cs @@ -242,6 +242,8 @@ namespace API.Tests.Parser [InlineData("Gifting The Wonderful World With Blessings! - 3 Side Stories [yuNS][Unknown]", true)] [InlineData("A Town Where You Live - Bonus Chapter.zip", true)] [InlineData("Yuki Merry - 4-Komga Anthology", false)] + [InlineData("Beastars - SP01", true)] + [InlineData("Beastars SP01", true)] public void ParseMangaSpecialTest(string input, bool expected) { Assert.Equal(expected, !string.IsNullOrEmpty(API.Parser.Parser.ParseMangaSpecial(input))); diff --git a/API/Parser/Parser.cs b/API/Parser/Parser.cs index 79fed5157..d453a7586 100644 --- a/API/Parser/Parser.cs +++ b/API/Parser/Parser.cs @@ -374,6 +374,10 @@ namespace API.Parser new Regex( @"(?Specials?|OneShot|One\-Shot|Omake|Extra( Chapter)?|Art Collection|Side( |_)Stories|Bonus)", RegexOptions.IgnoreCase | RegexOptions.Compiled), + // If SP\d+ is in the filename, we force treat it as a special regardless if volume or chapter might have been found. + new Regex( + @"(?SP\d+)", + RegexOptions.IgnoreCase | RegexOptions.Compiled), };