mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 13:33:28 +01:00 
			
		
		
		
	Bugfix: Missing request headers for direct APK link apps (#1688)
This commit is contained in:
		| @@ -24,6 +24,14 @@ class DirectAPKLink extends AppSource { | |||||||
|     ]; |     ]; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   @override | ||||||
|  |   Future<Map<String, String>?> getRequestHeaders( | ||||||
|  |       Map<String, dynamic> additionalSettings, | ||||||
|  |       {bool forAPKDownload = false}) { | ||||||
|  |     return html.getRequestHeaders(additionalSettings, | ||||||
|  |         forAPKDownload: forAPKDownload); | ||||||
|  |   } | ||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   Future<APKDetails> getLatestAPKDetails( |   Future<APKDetails> getLatestAPKDetails( | ||||||
|     String standardUrl, |     String standardUrl, | ||||||
|   | |||||||
| @@ -332,10 +332,13 @@ class HTML extends AppSource { | |||||||
|         additionalSettings['versionExtractWholePage'] == true |         additionalSettings['versionExtractWholePage'] == true | ||||||
|             ? versionExtractionWholePageString |             ? versionExtractionWholePageString | ||||||
|             : relDecoded); |             : relDecoded); | ||||||
|     version ??= |     version ??= additionalSettings['defaultPseudoVersioningMethod'] == | ||||||
|         additionalSettings['defaultPseudoVersioningMethod'] == 'APKLinkHash' |             'APKLinkHash' | ||||||
|             ? rel.hashCode.toString() |         ? rel.hashCode.toString() | ||||||
|             : (await checkPartialDownloadHashDynamic(rel)).toString(); |         : (await checkPartialDownloadHashDynamic(rel, | ||||||
|  |                 headers: await getRequestHeaders(additionalSettings, | ||||||
|  |                     forAPKDownload: true))) | ||||||
|  |             .toString(); | ||||||
|     return APKDetails(version, [rel].map((e) => MapEntry(e, e)).toList(), |     return APKDetails(version, [rel].map((e) => MapEntry(e, e)).toList(), | ||||||
|         AppNames(uri.host, tr('app'))); |         AppNames(uri.host, tr('app'))); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user