From 3ed6b168e17efec0ade89f3106053b6ce06e1acc Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Tue, 6 Aug 2024 11:36:39 -0400 Subject: [PATCH] Fix bug from previous version: APKPure fails to find universal APKs --- lib/app_sources/apkpure.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/app_sources/apkpure.dart b/lib/app_sources/apkpure.dart index 4480926..b3fe901 100644 --- a/lib/app_sources/apkpure.dart +++ b/lib/app_sources/apkpure.dart @@ -93,7 +93,11 @@ class APKPure extends AppSource { var apkUrls = apksDiv ?.querySelectorAll('div.group-title') .map((e) { - String? architecture = e.text.trim(); + String architecture = e.text.trim(); + if (architecture.toLowerCase() == 'unlimited' || + architecture.toLowerCase() == 'universal') { + architecture = ''; + } // Only take the first APK for each architecture, ignore others for now, for simplicity // Unclear why there can even be multiple APKs for the same version and arch var apkInfo = e.nextElementSibling?.querySelector('div.info'); @@ -116,6 +120,7 @@ class APKPure extends AppSource { DateTime? releaseDate = parseDateTimeMMMddCommayyyy(dateString); if (additionalSettings['autoApkFilterByArch'] == true && + architecture.isNotEmpty && !supportedArchs.contains(architecture)) { return const MapEntry('', ''); }