Skip to content

Expired chapters aren't getting removed #399

@valdotle

Description

@valdotle

@curche I think your commit #366 broke the removal of chapters. I tried to wrap my head around what the code is doing but I was having a hard time, so I can't fix it myself:

updated_chapters = [
         chapter
         for chapter in normalised_chapters
         if str(chapter.chapter_id) not in self._posted_chapters_ids
         and chapter.chapter_expire >= time_epoch_now
         and chapter.chapter_timestamp >= time_epoch_three_days_ago
]

Going by git blame, I think this is the relevant part.
From my understanding, the chapters in updated_chapters are getting updated? But we don't want to update newly created entries (assuming this is what str(chapter.chapter_id) not in self._posted_chapters_ids checks for). We don't want to update old chapters (or at least that's the idea to avoid old chapters getting reuploaded), hence the check whether the chapter has been uploaded within the past 3 days (chapter.chapter_timestamp >= time_epoch_three_days_ago), but why are we only updating chapters with an expiry date in the future?

Also, I was trying to figure out what caused the chapters to get reuploaded in the first place, but the api endpoint you updated doesn't work (assuming that's even relevant here).
Are old chapters becoming briefly unavailable, get deleted and when they become available again get reuploaded? Are M+ actively deleting and reuploading chapters? Or are the reader urls of existing chapters changing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions