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.26k stars 324 forks source link

Duplicated chapters after v0.8 update #2885

Open Roshri opened 6 months ago

Roshri commented 6 months ago

What happened?

After updating to latest stable (v0.8) I noticed that chapters would get duplicated in my manga libraries. image

Neither scanning the series nor force scanning the library again seem to help. Deleting and readding the series fixed it to some extent but the numbering seems odd image

Following this I checked the actual metadata on the files and found that when zero padding is present in the Number field, it creates that effect.

image image

So to get this result:

  1. Have a series in a manga library in previous stable
  2. The series should have comicinfo
  3. Number field should use zero padding
  4. Update to 0.8
  5. Scan/Force scan library after updating to v0.8

What did you expect?

Chapters appearing only once. Don't know about zero padding. I wouldn't strip it. Ideally show only the actual numbering on the comicinfo

Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.

0.8.0 - Stable

What operating system is Kavita being hosted from?

Windows

If the issue is being seen on Desktop, what OS are you running where you see the issue?

Windows

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Firefox, Chrome

If the issue is being seen on Mobile, what OS are you running where you see the issue?

Android

If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?

Firefox, Chrome

Relevant log output

No response

Additional Notes

No response

chilliwow commented 6 months ago

Having the same exact issue after updating to v0.8 and force scanning. Happens when there's one or multiple zeroes in front of the chapter number. Chapter reverted back to normal after removing the zeroes from the filename. image

chilliwow commented 6 months ago

If anyone has issues in the future, a quick fix is to move all files except for one out of the series folder and do a scan. Then add the files back and scan again.

majora2007 commented 6 months ago

I think this is due to the migration from v0.8 and there are likely some leftover chapters in the DB or something. Removing the chapters then readding should work.

I tried to reproduce myself by taking an existing chapter 1.cbr (already scanned in) then adding chapter 001 for the issue number in ComicInfo and no duplicate chapter did appear.

Roshri commented 6 months ago

Yeah definitely something broke during migration. Doing the plex dance for hundreds of series will probably take weeks but there's probably no other way. I should notify my users, this would reset the series progress I think

majora2007 commented 6 months ago

Yeah, it might be beneficial to write a script that marks as read for each of your users from that csv. You can also write some SQL likely to remove the chapters in the db.

It's really unfortunate you got hit so hard. Please wait till after the v0.8.1 release as I fixed more bugs with non-english locales creating duplicates.