mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-27 11:43:47 +01:00 
			
		
		
		
	Compare commits
	
		
			7 Commits
		
	
	
		
			d6d3623c63
			...
			v1.2.3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | e8f9159571 | ||
|  | d8cd17c858 | ||
|  | 01f423a741 | ||
|  | 77e764e76a | ||
|  | a37509c5a3 | ||
|  | cb9ac4cba0 | ||
|  | 9524148de7 | 
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -11,7 +11,8 @@ | |||||||
| .svn/ | .svn/ | ||||||
| .swiftpm/ | .swiftpm/ | ||||||
| migrate_working_dir/ | migrate_working_dir/ | ||||||
| .vscode/ | .vscode/* | ||||||
|  | !.vscode/launch.json | ||||||
|  |  | ||||||
| # IntelliJ related | # IntelliJ related | ||||||
| *.iml | *.iml | ||||||
|   | |||||||
							
								
								
									
										28
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | |||||||
|  | { | ||||||
|  |     // Use IntelliSense to learn about possible attributes. | ||||||
|  |     // Hover to view descriptions of existing attributes. | ||||||
|  |     // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||||||
|  |     "version": "0.2.0", | ||||||
|  |     "configurations": [ | ||||||
|  |         { | ||||||
|  |             "name": "Obtainium", | ||||||
|  |             "request": "launch", | ||||||
|  |             "type": "dart", | ||||||
|  |             "args":[ "--flavor", "normal" ] | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "name": "Obtainium (profile mode)", | ||||||
|  |             "request": "launch", | ||||||
|  |             "type": "dart", | ||||||
|  |             "flutterMode": "profile", | ||||||
|  |             "args":[ "--flavor", "normal" ] | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "name": "Obtainium (release mode)", | ||||||
|  |             "request": "launch", | ||||||
|  |             "type": "dart", | ||||||
|  |             "flutterMode": "release", | ||||||
|  |             "args":[ "--flavor", "normal" ] | ||||||
|  |         } | ||||||
|  |     ] | ||||||
|  | } | ||||||
| @@ -36,13 +36,15 @@ class RuStore extends AppSource { | |||||||
|     return Uri.parse(standardUrl).pathSegments.last; |     return Uri.parse(standardUrl).pathSegments.last; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   Future<String> decodeString(String str) async { |   Future<dynamic> decodeJsonBody(Uint8List bytes) async { | ||||||
|     try { |     try { | ||||||
|       return (await CharsetDetector.autoDecode( |       return jsonDecode((await CharsetDetector.autoDecode(bytes)).string); | ||||||
|         Uint8List.fromList(str.codeUnits), |  | ||||||
|       )).string; |  | ||||||
|     } catch (e) { |     } catch (e) { | ||||||
|       return str; |       try { | ||||||
|  |         return jsonDecode(utf8.decode(bytes)); | ||||||
|  |       } catch (_) { | ||||||
|  |         rethrow; | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @@ -59,7 +61,7 @@ class RuStore extends AppSource { | |||||||
|     if (res0.statusCode != 200) { |     if (res0.statusCode != 200) { | ||||||
|       throw getObtainiumHttpError(res0); |       throw getObtainiumHttpError(res0); | ||||||
|     } |     } | ||||||
|     var appDetails = jsonDecode(res0.body)['body']; |     var appDetails = (await decodeJsonBody(res0.bodyBytes))['body']; | ||||||
|     if (appDetails['appId'] == null) { |     if (appDetails['appId'] == null) { | ||||||
|       throw NoReleasesError(); |       throw NoReleasesError(); | ||||||
|     } |     } | ||||||
| @@ -83,15 +85,11 @@ class RuStore extends AppSource { | |||||||
|       followRedirects: false, |       followRedirects: false, | ||||||
|       postBody: {"appId": appDetails['appId'], "firstInstall": true}, |       postBody: {"appId": appDetails['appId'], "firstInstall": true}, | ||||||
|     ); |     ); | ||||||
|     var downloadDetails = jsonDecode(res1.body)['body']; |     var downloadDetails = (await decodeJsonBody(res1.bodyBytes))['body']; | ||||||
|     if (res1.statusCode != 200 || downloadDetails['apkUrl'] == null) { |     if (res1.statusCode != 200 || downloadDetails['apkUrl'] == null) { | ||||||
|       throw NoAPKError(); |       throw NoAPKError(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     appName = await decodeString(appName); |  | ||||||
|     author = await decodeString(author); |  | ||||||
|     changeLog = changeLog != null ? await decodeString(changeLog) : null; |  | ||||||
|  |  | ||||||
|     return APKDetails( |     return APKDetails( | ||||||
|       version, |       version, | ||||||
|       getApkUrlsFromUrls([ |       getApkUrlsFromUrls([ | ||||||
|   | |||||||
| @@ -1084,7 +1084,8 @@ class AppsProvider with ChangeNotifier { | |||||||
|       var trackOnly = apps[id]!.app.additionalSettings['trackOnly'] == true; |       var trackOnly = apps[id]!.app.additionalSettings['trackOnly'] == true; | ||||||
|       var refreshBeforeDownload = |       var refreshBeforeDownload = | ||||||
|           apps[id]!.app.additionalSettings['refreshBeforeDownload'] == true || |           apps[id]!.app.additionalSettings['refreshBeforeDownload'] == true || | ||||||
|           apps[id]!.app.apkUrls.first.value == 'placeholder'; |           apps[id]!.app.apkUrls.isNotEmpty && | ||||||
|  |               apps[id]!.app.apkUrls.first.value == 'placeholder'; | ||||||
|       if (refreshBeforeDownload) { |       if (refreshBeforeDownload) { | ||||||
|         await checkUpdate(apps[id]!.app.id); |         await checkUpdate(apps[id]!.app.id); | ||||||
|       } |       } | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev | |||||||
| # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html | ||||||
| # In Windows, build-name is used as the major, minor, and patch parts | # In Windows, build-name is used as the major, minor, and patch parts | ||||||
| # of the product and file versions while build-number is used as the build suffix. | # of the product and file versions while build-number is used as the build suffix. | ||||||
| version: 1.2.2+2318 | version: 1.2.3+2319 | ||||||
|  |  | ||||||
| environment: | environment: | ||||||
|   sdk: ^3.8.1 |   sdk: ^3.8.1 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user