-
Notifications
You must be signed in to change notification settings - Fork 7
Description
@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?