Remove 1 or 2 hour library updates to avoid DDoSing sources

This commit is contained in:
arkon
2021-05-22 11:52:28 -04:00
parent 2f7f00c7a2
commit 569df39fb8
4 changed files with 10 additions and 6 deletions
@@ -182,6 +182,14 @@ object Migrations {
remove("pref_default_viewer_key")
}
}
if (oldVersion < 61) {
// Handle removed every 1 or 2 hour library updates
val updateInterval = preferences.libraryUpdateInterval().get()
if (updateInterval == 1 || updateInterval == 2) {
preferences.libraryUpdateInterval().set(3)
LibraryUpdateJob.setupTask(context, 3)
}
}
return true
}