Smarter library update strategy - do it according to MD's last updated manga
See original GitHub issueWhy/User Benefit/User Problem
As far as I could glance from app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateRanker.kt
, the “last updated” library update order orders manga by how recently the local copy was updated. This is smarter than doing it alphabetically, but ideally we want to update according to MangaDex’s update order
What/Requirements
Neko could grab the list of last updated manga, and filter by what’s in the local library. Then match the sequence of when manga was updated with a local cache to know when to stop (a hard stop of some amount of time or manga could be hardcoded so this stop at some point). This method makes it so Neko not only updates just what’s new since last time it checked, and it only needs to check a fraction of the manga in the library.
A possible issue could arise if the user changes the categories to be checked when the library updates (this changes the criteria of what manga to update. a flag could be set so that when this changes, Neko lets the user know and offers to update the extra categories (if the user removes categories from the update this is not an issue).
The sequense used to match where to stop looking for new manga should be from the whole list MangaDex provides, not just what’s in the library, to avoid issues when the users adds/removes manga or adds/removes categories from the global update.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
I’ll look into more for 3.x but have no plans to add something like this for 2.x
I’ve implemented an approach to this and put it in pull request #444
The pitch is simple - manga updates are performed on a consistent enough schedule that we can guess when the next update will occur. You get the current update interval for any manga by looking at how frequently the last few updates have been performed. Then take this update interval and add it to the last updated date and you can get a fairly good idea of when the next chapter will drop.
This can be skewed by bonus chapters and manga with multiple scanlators, but it’s still fairly robust and you can increase the range over which you’re averaging the update interval in order to reduce sensitivity to irregularities. I used an average of the last 4 updates (so 3 update intervals) to make sure it would still be at least mildly responsive to things like when the scanlator catches up to the raws and the rate drops.
It’s not a perfect solution, but it’s a solution that requires no additional API calls and does not require running any new background processes to poll for updates. It’s also a solution that’s close enough to the real thing I don’t think people will be able to tell the difference.