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.23k stars 323 forks source link

Post Migration Issues #2816

Closed majora2007 closed 6 months ago

majora2007 commented 7 months ago

Please comment as much information as possible after you have updated to the Comic Rework nightly.

In your comment, please include if the issue you are facing is after a force scan on said series/library or not.

TheDarkMage commented 7 months ago

On version 0.7.14.9 when force scanning a series that contains files that have a comicinfo file containing a number tag a duplicate volume is created. Based on the log it appears that it thinks that its a new chapter even though it already has been added. [Kavita] [2024-03-24 20:56:32.331 -04:00 83] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Parsing My Daughter Left the Nest and Returned an S-Rank Adventurer - Volume 1 [Kavita] [2024-03-24 20:56:32.332 -04:00 83] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Adding new chapter, My Daughter Left the Nest and Returned an S-Rank Adventurer - Vol 1 Ch 1.0

majora2007 commented 7 months ago

@TheDarkMage I believe this should be fixed in v0.7.14.10. Please do let me know.

TheDarkMage commented 7 months ago

It's still happening with the same behavior. I even tried deleting the series and re-adding it to see if that would help, but no luck.

majora2007 commented 7 months ago

Can you give me a bit more information? Are these archives, epub, PDF, etc? What type of library are they in?

TheDarkMage commented 7 months ago

These are Manga cbz files that were exported from calibre originally.

TheDarkMage commented 7 months ago

I also tried adding the number tag to a non calibre exported cbz file and it produced the same results.

majora2007 commented 7 months ago

I also tried adding the number tag to a non calibre exported cbz file and it produced the same results.

Can you check if there is a comicinfo in the files? Calibre doesn't actually write metadata to archives, just to it's "database".

TheDarkMage commented 7 months ago

There is, I forgot that I have a plugin that writes the data to the comicinfo file.

majora2007 commented 7 months ago

Some issues I found myself:

majora2007 commented 6 months ago

@TheDarkMage can you provide for me a list of the files (that are causing duplication) and the ComicInfo.xml for each?

I can't reproduce with non-ComicInfo.xml: image

TheDarkMage commented 6 months ago

It appears that 7.14.11 has fixed the problem, but in case you still want the info, the file names are

My Daughter Left the Nest and Returned an S-Rank Adventurer v01.cbz
My Daughter Left the Nest and Returned an S-Rank Adventurer v02.cbz
My Daughter Left the Nest and Returned an S-Rank Adventurer v03.cbz

and here are the comicinfo files renamed to v0#_ComicInfo.xml https://drive.google.com/drive/folders/1L7-gwbgh0DuvrrltJ0SJgnZ17pXjob30?usp=sharing

majora2007 commented 6 months ago

Awesome, glad it got fixed. Pretty positive everything should be working as it did before. I'll leave this issue open for one more week in case anything pops up.

TheDarkMage commented 6 months ago

Two things I noticed after updating my main instance from 7.14.3 to 7.14.11. First I'm having to delete and re-add some series or a duplicate manga volume still gets made. The original volume shows up as Chapter 1.0 and the duplicate shows up as Chapter 1. I'm assuming this is something that just needs to be checked for in one of the after update migrations that get run e.g. change chapter number from 1.0 to just 1, but I could be wrong.

Second thing, I noticed that loose leaf chapters are showing up before volumes/chapters in volumes e.g. chapter 41 shows up before volume 1 and when trying to read, chapters jump back to the beginning of the volume instead of to the next volume e.g. instead of vol 1 ch3 to vol1 ch4, it goes to vol1 ch1. These both get fixed after a forced series scan though.

majora2007 commented 6 months ago

@TheDarkMage are you doing a force scan after updating? The migration does have the work but it does leave some stuff in an in-between state. Then the force scan ensures everything is cleaned up.

I can't do it automatically on startup as force scans can take hours.

TheDarkMage commented 6 months ago

I am doing a force scan after updating, that is what is causing the duplicate volume to get made. I took a look at the db, and it looks like this is happening because the range is 1.0 compared to the new volume with a range of 1 as if I manually change the volumes range to 1 then the duplicate doesn't get made, but I could be totally off on this.

As for the second thing, I get that you can't do a force scan automatically. I was more so just letting you know that this was happening, not asking that you do a force scan, sorry if I worded that poorly.

majora2007 commented 6 months ago

Ahh the 1.0 vs 1 issue was just fixed in the latest nightly (v0.7.14.11). I also saw that as well.

Oh no, for the force scan, what I meant is that at startup, after the migrations run, I can't necessarily force a scan before the user interacts with the system, hence why it's needed for the user to do a force scan themselves, so the system can cleanup leftover data from the manual migrations. That's all I meant.

TheDarkMage commented 6 months ago

Gotcha, I misread your comment, my bad. I just went back and did a full library force scan and it looks like everything is working properly now. Thanks for all your work!

majora2007 commented 6 months ago

Closing now as no new issues have been reported. Looks like new code is working great.