Enable arch-based auto-filter for intermediate HTML links (#2162)

This commit is contained in:
Imran Remtulla
2025-03-07 16:45:32 -05:00
parent 6c6f256976
commit 044bd7f8a0
2 changed files with 27 additions and 12 deletions

View File

@ -212,6 +212,10 @@ class HTML extends AppSource {
required: true,
additionalValidators: [(value) => regExValidator(value)])
],
[
GeneratedFormSwitch('autoApkFilterByArch',
label: tr('autoApkFilterByArch'), defaultValue: false)
],
];
HTML() {
additionalSourceAppSpecificSettingFormItems = [
@ -315,6 +319,10 @@ class HTML extends AppSource {
if (intLinks.isEmpty) {
throw NoReleasesError(note: currentUrl);
} else {
if (additionalSettings['intermediateLink'][i]['autoApkFilterByArch'] ==
true) {
intLinks = await filterApksByArch(intLinks);
}
currentUrl = intLinks.last.key;
}
}