Fixed type errors and HTML APK filter

This commit is contained in:
Imran Remtulla
2023-02-16 22:36:53 -05:00
parent c5ff1de950
commit 890787f87f
3 changed files with 8 additions and 4 deletions

View File

@@ -27,6 +27,10 @@ class HTML extends AppSource {
.where((element) => element.toLowerCase().endsWith('.apk'))
.toList();
links.sort((a, b) => a.split('/').last.compareTo(b.split('/').last));
if (additionalSettings['apkFilterRegEx'] != null) {
var reg = RegExp(additionalSettings['apkFilterRegEx']);
links = links.where((element) => reg.hasMatch(element)).toList();
}
if (links.isEmpty) {
throw NoReleasesError();
}