Interlude/Half Volumes (#626)

* Refactored Parser to handle parts

* Fixed a bug where marking multiple entities as unread would actually make them look read on the UI

* Implemented the ability to have float volume numbers

* Removed two unit test cases

* Code smells
This commit is contained in:
Joseph Milazzo 2021-10-03 13:30:31 -07:00 committed by GitHub
parent d4507e3288
commit 6e85fe8c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 62 deletions

View file

@ -67,6 +67,7 @@ namespace API.Tests.Parser
[InlineData("X-Men v1 #201 (September 2007).cbz", "1")]
[InlineData("Hentai Ouji to Warawanai Neko. - Vol. 06 Ch. 034.5", "6")]
[InlineData("The 100 Girlfriends Who Really, Really, Really, Really, Really Love You - Vol. 03 Ch. 023.5 - Volume 3 Extras.cbz", "3")]
[InlineData("The 100 Girlfriends Who Really, Really, Really, Really, Really Love You - Vol. 03.5 Ch. 023.5 - Volume 3 Extras.cbz", "3.5")]
public void ParseVolumeTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseVolume(filename));
@ -291,18 +292,6 @@ namespace API.Tests.Parser
Assert.Equal(expected, API.Parser.Parser.ParseMangaSpecial(inputFile));
}
/*
private static ParserInfo CreateParserInfo(string series, string chapter, string volume, bool isSpecial = false)
{
return new ParserInfo()
{
Chapters = chapter,
Volumes = volume,
IsSpecial = isSpecial,
Series = series,
};
}
*/
[Theory]
[InlineData("/manga/Btooom!/Vol.1/Chapter 1/1.cbz", "Btooom!~1~1")]