Downgrade permission handler to fix #932 + APKPure improvement

This commit is contained in:
Imran Remtulla
2023-09-23 17:18:12 -04:00
parent 3f63dc0180
commit 3ea8dc598c
4 changed files with 8 additions and 6 deletions

View File

@@ -26,12 +26,14 @@ class APKPure extends AppSource {
@override
String sourceSpecificStandardizeURL(String url) {
RegExp standardUrlRegExB = RegExp('^https?://m.$host/+[^/]+/+[^/]+');
RegExp standardUrlRegExB =
RegExp('^https?://m.$host/+[^/]+/+[^/]+(/+[^/]+)?');
RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase());
if (match != null) {
url = 'https://$host${Uri.parse(url).path}';
}
RegExp standardUrlRegExA = RegExp('^https?://$host/+[^/]+/+[^/]+');
RegExp standardUrlRegExA =
RegExp('^https?://$host/+[^/]+/+[^/]+(/+[^/]+)?');
match = standardUrlRegExA.firstMatch(url.toLowerCase());
if (match == null) {
throw InvalidURLError(name);