mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-21 05:29:29 +02:00
HTML Source bugfix (related to #1259)
This commit is contained in:
@@ -149,6 +149,7 @@ class HTML extends AppSource {
|
|||||||
[
|
[
|
||||||
GeneratedFormTextField('requestHeader',
|
GeneratedFormTextField('requestHeader',
|
||||||
label: tr('requestHeader'),
|
label: tr('requestHeader'),
|
||||||
|
required: false,
|
||||||
additionalValidators: [
|
additionalValidators: [
|
||||||
(value) {
|
(value) {
|
||||||
if ((value ?? 'empty:valid')
|
if ((value ?? 'empty:valid')
|
||||||
@@ -301,16 +302,15 @@ class HTML extends AppSource {
|
|||||||
}
|
}
|
||||||
var rel = links.last.key;
|
var rel = links.last.key;
|
||||||
String? version;
|
String? version;
|
||||||
if (additionalSettings['supportFixedAPKURL'] != true) {
|
|
||||||
version = rel.hashCode.toString();
|
|
||||||
}
|
|
||||||
version = extractVersion(
|
version = extractVersion(
|
||||||
additionalSettings['versionExtractionRegEx'] as String?,
|
additionalSettings['versionExtractionRegEx'] as String?,
|
||||||
additionalSettings['matchGroupToUse'] as String?,
|
additionalSettings['matchGroupToUse'] as String?,
|
||||||
additionalSettings['versionExtractWholePage'] == true
|
additionalSettings['versionExtractWholePage'] == true
|
||||||
? res.body.split('\r\n').join('\n').split('\n').join('\\n')
|
? res.body.split('\r\n').join('\n').split('\n').join('\\n')
|
||||||
: rel);
|
: rel);
|
||||||
version ??= (await checkDownloadHash(rel)).toString();
|
version ??= additionalSettings['supportFixedAPKURL'] != true
|
||||||
|
? rel.hashCode.toString()
|
||||||
|
: (await checkDownloadHash(rel)).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