Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified FetchInterval to look for consecutive chapters #1006

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Syntribos
Copy link

If a manga has 8 or more chapters, but the 10 most recent chapters aren't consecutive (e.g. using a source that only allows free users to download the 5 most recent chapters and the first 5 chapters), Tachiyomi will average the time between the most recent chapter and the 10th most recent available chapter.

This means that if there are missing chapters in-between, the smart update interval could be wildly off. If a manga has 105 chapters, with the most recent chapter on day 1470 (biweekly) but only the first and last 5 chapters are available, Tachi will say that the next chapter releases in ( (1470 - 0) / 10) = 147 days. This change makes Tachi only look at the most recent chapters with consecutive chapter numbers, so in that hypothetical it would expect the next chapter in ((1470 - 1400) / 5) = 14 days.

There's definitely more improvements possible here, this is just a quick hacky change. Ideally it would use more complex math, and currently this change wouldn't work if Tachiyomi can't determine actual chapter numbers (I'm not sure what cases this would happen in).

Other potential improvement: calculate expected next update using the update frequency and the last chapter upload date, rather than the date that the manga was last checked in Tachiyomi.

Before change:
image

After change:
image

…rval if there are gaps in available chapters
@AntsyLich
Copy link

How does it handle part chapters like 1.1, 1.2 etc.

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.

None yet

2 participants