Imported implementation for updating library by next expected update from Neko (#5436)

* Imported implementation for updating library by next expected update from Neko. This sort uses the last 4 updates for a manga to compute an average time between updates and then extrapolates when the next update should occur.

Currently seems to work perfectly. However, I may have silently messed something up along the way.

All code and algorithms are credited to kyjibo on GitHub. The original commit adding this functionality is here: 681003926a

* Imported implementation for updating library by next expected update from Neko. This sort uses the last 4 updates for a manga to compute an average time between updates and then extrapolates when the next update should occur.

Currently seems to work perfectly. However, I may have silently messed something up along the way.

All code and algorithms are credited to kyjibo on GitHub. The original commit adding this functionality is here: 681003926a

* Remove commented-out line from LibraryUpdateRanker

I missed removing this when first committing. The removed line is a holdover from Neko, which requires 7+, but I removed the function that requires this.
This commit is contained in:
stinky-lizard
2021-07-01 18:11:21 -04:00
committed by GitHub
parent 3c67a36b60
commit 70ed49e478
11 changed files with 115 additions and 10 deletions

View File

@@ -251,7 +251,8 @@ class SettingsLibraryController : SettingsController() {
// ../../data/library/LibraryUpdateRanker.kt
val priorities = arrayOf(
Pair("0", R.string.action_sort_alpha),
Pair("1", R.string.action_sort_last_checked)
Pair("1", R.string.action_sort_last_checked),
Pair("2", R.string.action_sort_next_updated)
)
val defaultPriority = priorities[0]