mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Remove 1 or 2 hour library updates to avoid DDoSing sources
This commit is contained in:
		@@ -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
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -126,8 +126,6 @@ class SettingsLibraryController : SettingsController() {
 | 
			
		||||
                titleRes = R.string.pref_library_update_interval
 | 
			
		||||
                entriesRes = arrayOf(
 | 
			
		||||
                    R.string.update_never,
 | 
			
		||||
                    R.string.update_1hour,
 | 
			
		||||
                    R.string.update_2hour,
 | 
			
		||||
                    R.string.update_3hour,
 | 
			
		||||
                    R.string.update_4hour,
 | 
			
		||||
                    R.string.update_6hour,
 | 
			
		||||
@@ -137,7 +135,7 @@ class SettingsLibraryController : SettingsController() {
 | 
			
		||||
                    R.string.update_48hour,
 | 
			
		||||
                    R.string.update_weekly
 | 
			
		||||
                )
 | 
			
		||||
                entryValues = arrayOf("0", "1", "2", "3", "4", "6", "8", "12", "24", "48", "168")
 | 
			
		||||
                entryValues = arrayOf("0", "3", "4", "6", "8", "12", "24", "48", "168")
 | 
			
		||||
                defaultValue = "24"
 | 
			
		||||
                summary = "%s"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user