Skip to content

Shed chapters that a re-parse no longer maps to - #4832

Open
StereotypicalCat wants to merge 1 commit into
Kareadita:developfrom
StereotypicalCat:bugfix/stale-chapters-not-shed-on-reparse
Open

Shed chapters that a re-parse no longer maps to#4832
StereotypicalCat wants to merge 1 commit into
Kareadita:developfrom
StereotypicalCat:bugfix/stale-chapters-not-shed-on-reparse

Conversation

@StereotypicalCat

Copy link
Copy Markdown
Contributor

Fixed

  • Fixed: Fixed a bug where chapters that no longer parse out of a filename stayed in the library forever, even after a forced scan. For example, 'Blade Runner 2019 - Volume 1.pdf' was previously read as both Volume 1 and Chapter 2019, and kept showing a Chapter 2019 entry long after parsing stopped producing one. (Fixes Kavita doesnt remove old scanner results after parser change. #4831)

RemoveChapters pruned a chapter's files against every ParserInfo in the
volume, not just the ones that resolved to that chapter, so a chapter
whose file now maps elsewhere stayed non-empty and survived removal.
@majora2007

Copy link
Copy Markdown
Member

This seems to be 100% AI coded. The test also feels a bit shallow. This needs more looking into.

@StereotypicalCat

StereotypicalCat commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for taking a look :)

On the AI point: AI was involved in reviewing* the change, but the fix is mine :) I traced the behavior in RemoveChapters using Riders debugger on a copy of my own library, and id be happy to walk through my reasoning if that would help get this PR over the line.

I agree that my test is shallow though, as my actual verification was done live, where ie edited the parser directly, forced a re-scan, and confirmed the old chapters got removed. I wasnt sure how much to invest in stubbing out a parser difference in a way that wouldn't stop working if there were changes to code structure in the future, and I didnt want to make too many changes for what I wanted to be a short and "self-contained" code fix.

Is there anything I can do to make this easier to accept? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kavita doesnt remove old scanner results after parser change.

2 participants