Kareadita / Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
http://www.kavitareader.com
GNU General Public License v3.0
6.29k stars 327 forks source link

Support for uncommon issue numbering from publishers #1771

Closed DieselTech closed 1 year ago

DieselTech commented 1 year ago

Describe the bug Issue numbers from publishers are causing import errors because they are non-standard. Some have numbers attached to them like # 1.HU while other issue numbers are in the negatives (-1), while others aren't numerical at all (#OMEGA)

[Kavita] [2023-02-01 17:15:10.416 -05:00  41] [Error] API.Services.Tasks.Scanner.ProcessSeries There was some issue when updating chapter's metadata
System.FormatException: Input string was not in a correct format.
   at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
   at API.Data.Metadata.ComicInfo.CalculatedCount() in /home/runner/work/Kavita/Kavita/API/Data/Metadata/ComicInfo.cs:line 133
   at API.Services.Tasks.Scanner.ProcessSeries.UpdateChapterFromComicInfo(Chapter chapter, ComicInfo info)
   at API.Services.Tasks.Scanner.ProcessSeries.UpdateVolumes(Series series, IList`1 parsedInfos, Boolean forceUpdate) in /home/runner/work/Kavita/Kavita/API/Services/Tasks/Scanner/ProcessSeries.cs:line 504

Expected behavior Issue metadata shouldn't fail on import.

Screenshots (https://cdn.discordapp.com/attachments/851515194185744464/1070476708802736158/image.png) (https://cdn.discordapp.com/attachments/851515194185744464/1070477333426864269/image.png)

Desktop (please complete the following information):

Additional context The comic industry has never followed any standard convention when it comes to naming things. Just ignoring these special cases or dropping their suffixes isn't recommended because many times there is already another issue with that same number. On top of them using odd numbers as a starting issue #, here is the current list of naming exceptions that mylar uses to parse:

'ALPHA',
'OMEGA',
'BLACK',
'AU',
'AI',
'INH',
'NOW',
'BEY',
'MU',
'HU',
'LR',
'A',
'B',
'C',
'X',
'O',
'WHITE',
'SUMMER',
'SPRING',
'FALL',
'WINTER',
'PREVIEW',
"DIRECTOR'S CUT",
"(DC)"
majora2007 commented 1 year ago

What if these type of issues were classified as specials under the Series? So 1.MU -> into specials and show as that while just 1 would be in issues?

DieselTech commented 1 year ago

That might be a good compromise for now if the issue also has a number with it like: #1.MU

However if it doesn't have a number with it, it's likely the actual naming for that series. Example: https://comicvine.gamespot.com/god-is-dead-the-book-of-acts/4050-76270/

hwwilliams commented 1 year ago

Just wanted to throw my hat in the discussion as I've recently seen this issue as well.

[Kavita] [2023-05-12 17:20:52.385 -04:00  73] [Error] API.Services.Tasks.Scanner.ProcessSeries There was some issue when updating chapter's metadata                                                                                                                                                   
System.FormatException: The input string '19.HU' was not in a correct format.                                                                                                                                                                                                                          
   at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, ReadOnlySpan`1 value, TypeCode type)                                                                                                                                                                                          
   at API.Data.Metadata.ComicInfo.CalculatedCount() in /home/runner/work/Kavita/Kavita/API/Data/Metadata/ComicInfo.cs:line 150                                                                                                                                                                         
   at API.Services.Tasks.Scanner.ProcessSeries.UpdateChapterFromComicInfo(Chapter chapter, ComicInfo info)                                                                                                                                                                                             
   at API.Services.Tasks.Scanner.ProcessSeries.UpdateVolumes(Series series, IList`1 parsedInfos, Boolean forceUpdate) in /home/runner/work/Kavita/Kavita/API/Services/Tasks/Scanner/ProcessSeries.cs:line 573                                                                                          
[Kavita] [2023-05-12 17:20:52.386 -04:00  73] [Error] API.Services.Tasks.Scanner.ProcessSeries There was some issue when updating chapter's metadata                                                                                                                                                   
System.FormatException: The input string '16.HU' was not in a correct format.                                                                                                                                                                                                                          
   at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, ReadOnlySpan`1 value, TypeCode type)                                                                                                                                                                                          
   at API.Data.Metadata.ComicInfo.CalculatedCount() in /home/runner/work/Kavita/Kavita/API/Data/Metadata/ComicInfo.cs:line 150                                                                                                                                                                         
   at API.Services.Tasks.Scanner.ProcessSeries.UpdateChapterFromComicInfo(Chapter chapter, ComicInfo info)                                                                                                                                                                                             
   at API.Services.Tasks.Scanner.ProcessSeries.UpdateVolumes(Series series, IList`1 parsedInfos, Boolean forceUpdate) in /home/runner/work/Kavita/Kavita/API/Services/Tasks/Scanner/ProcessSeries.cs:line 573

It was scanning this Spider-Man series which has .BEY, .LR, and .HU.

majora2007 commented 1 year ago

If there isn't already a feature request, I would highly recommend making one so users can upvote this. It gives a lot more insight for myself if there are more than just a few users having this issue.

hwwilliams commented 1 year ago

If there isn't already a feature request, I would highly recommend making one so users can upvote this. It gives a lot more insight for myself if there are more than just a few users having this issue.

I have created a feature request here.

majora2007 commented 1 year ago

Closing as there is a feature request available.