Special Markers (#305)

* Removed "Anthology" from being a special parsing keyword as series are being found where "Anthology" is in the series name.

* SP# is now a way to force the file to be a special rather than pushing it into a Specials folder.
This commit is contained in:
Joseph Milazzo 2021-06-14 17:35:13 -05:00 committed by GitHub
parent f8aba21acd
commit 46b60405b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -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)));

View File

@ -374,6 +374,10 @@ namespace API.Parser
new Regex(
@"(?<Special>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(
@"(?<Special>SP\d+)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
};