mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-26 03:03:45 +01:00 
			
		
		
		
	Add allowOverride app source option
This commit is contained in:
		| @@ -13,6 +13,7 @@ class CoolApk extends AppSource { | ||||
|     hosts = ['www.coolapk.com', 'api2.coolapk.com']; | ||||
|     allowSubDomains = true; | ||||
|     naiveStandardVersionDetection = true; | ||||
|     allowOverride = false; | ||||
|   } | ||||
|  | ||||
|   @override | ||||
| @@ -170,4 +171,4 @@ class CoolApk extends AppSource { | ||||
|  | ||||
|     return {'deviceCode': deviceCode, 'token': finalToken}; | ||||
|   } | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -407,8 +407,14 @@ class AddAppPageState extends State<AddAppPage> { | ||||
|                         defaultValue: pickedSourceOverride ?? '', | ||||
|                         [ | ||||
|                           MapEntry('', tr('none')), | ||||
|                           ...sourceProvider.sources.map( | ||||
|                               (s) => MapEntry(s.runtimeType.toString(), s.name)) | ||||
|                           ...sourceProvider.sources | ||||
|                               .where((s) => | ||||
|                                   s.allowOverride || | ||||
|                                   (pickedSource != null && | ||||
|                                       pickedSource.runtimeType == | ||||
|                                           s.runtimeType)) | ||||
|                               .map((s) => | ||||
|                                   MapEntry(s.runtimeType.toString(), s.name)) | ||||
|                         ], | ||||
|                         label: tr('overrideSource')) | ||||
|                   ] | ||||
|   | ||||
| @@ -586,6 +586,7 @@ abstract class AppSource { | ||||
|   bool appIdInferIsOptional = false; | ||||
|   bool allowSubDomains = false; | ||||
|   bool naiveStandardVersionDetection = false; | ||||
|   bool allowOverride = true; | ||||
|   bool neverAutoSelect = false; | ||||
|   bool showReleaseDateAsVersionToggle = false; | ||||
|   bool versionDetectionDisallowed = false; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user