mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 22:37:56 +01:00 
			
		
		
		
	Remove global update intervals below 12 hours, add every 3 day interval
Users with smaller libraries have a lower change of getting updates frequently. "Power users" are actively hurting sources by updating frequently.
This commit is contained in:
		| @@ -235,6 +235,14 @@ object Migrations { | ||||
|                     preferences.enabledLanguages() += "all" | ||||
|                 } | ||||
|             } | ||||
|             if (oldVersion < 71) { | ||||
|                 // Handle removed every 3, 4, 6, and 8 hour library updates | ||||
|                 val updateInterval = preferences.libraryUpdateInterval().get() | ||||
|                 if (updateInterval in listOf(3, 4, 6, 8)) { | ||||
|                     preferences.libraryUpdateInterval().set(12) | ||||
|                     LibraryUpdateJob.setupTask(context, 12) | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             return true | ||||
|         } | ||||
|   | ||||
| @@ -139,16 +139,13 @@ class SettingsLibraryController : SettingsController() { | ||||
|                 titleRes = R.string.pref_library_update_interval | ||||
|                 entriesRes = arrayOf( | ||||
|                     R.string.update_never, | ||||
|                     R.string.update_3hour, | ||||
|                     R.string.update_4hour, | ||||
|                     R.string.update_6hour, | ||||
|                     R.string.update_8hour, | ||||
|                     R.string.update_12hour, | ||||
|                     R.string.update_24hour, | ||||
|                     R.string.update_48hour, | ||||
|                     R.string.update_72hour, | ||||
|                     R.string.update_weekly | ||||
|                 ) | ||||
|                 entryValues = arrayOf("0", "3", "4", "6", "8", "12", "24", "48", "168") | ||||
|                 entryValues = arrayOf("0", "12", "24", "48", "72", "168") | ||||
|                 defaultValue = "24" | ||||
|                 summary = "%s" | ||||
|  | ||||
|   | ||||
| @@ -211,13 +211,11 @@ | ||||
|     <string name="pref_category_library_update">Global update</string> | ||||
|     <string name="pref_library_update_interval">Update frequency</string> | ||||
|     <string name="update_never">Manual</string> | ||||
|     <string name="update_3hour">Every 3 hours</string> | ||||
|     <string name="update_4hour">Every 4 hours</string> | ||||
|     <string name="update_6hour">Every 6 hours</string> | ||||
|     <string name="update_8hour">Every 8 hours</string> | ||||
|     <string name="update_12hour">Every 12 hours</string> | ||||
|     <string name="update_24hour">Daily</string> | ||||
|     <string name="update_48hour">Every 2 days</string> | ||||
|     <string name="update_72hour">Every 3 days</string> | ||||
|     <string name="update_weekly">Weekly</string> | ||||
|     <string name="pref_library_update_prioritization">Update order</string> | ||||
|     <string name="pref_library_update_restriction">Update restrictions</string> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user