mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-22 17:19:42 +02:00
Allow for spaces in HTML link and version filters (#1537)
This commit is contained in:
@@ -244,16 +244,17 @@ class HTML extends AppSource {
|
|||||||
true) {
|
true) {
|
||||||
var reg = RegExp(additionalSettings['customLinkFilterRegex']);
|
var reg = RegExp(additionalSettings['customLinkFilterRegex']);
|
||||||
links = allLinks
|
links = allLinks
|
||||||
.where((element) =>
|
.where((element) => reg.hasMatch(
|
||||||
reg.hasMatch(filterLinkByText ? element.value : element.key))
|
filterLinkByText ? element.value : Uri.decodeFull(element.key)))
|
||||||
.toList();
|
.toList();
|
||||||
} else {
|
} else {
|
||||||
links = allLinks
|
links = allLinks
|
||||||
.where((element) =>
|
.where((element) => Uri.parse(filterLinkByText
|
||||||
Uri.parse(filterLinkByText ? element.value : element.key)
|
? element.value
|
||||||
.path
|
: Uri.decodeFull(element.key))
|
||||||
.toLowerCase()
|
.path
|
||||||
.endsWith('.apk'))
|
.toLowerCase()
|
||||||
|
.endsWith('.apk'))
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
if (!skipSort) {
|
if (!skipSort) {
|
||||||
@@ -315,7 +316,7 @@ class HTML extends AppSource {
|
|||||||
additionalSettings['matchGroupToUse'] as String?,
|
additionalSettings['matchGroupToUse'] as String?,
|
||||||
additionalSettings['versionExtractWholePage'] == true
|
additionalSettings['versionExtractWholePage'] == true
|
||||||
? versionExtractionWholePageString
|
? versionExtractionWholePageString
|
||||||
: rel);
|
: Uri.decodeFull(rel));
|
||||||
version ??=
|
version ??=
|
||||||
additionalSettings['defaultPseudoVersioningMethod'] == 'APKLinkHash'
|
additionalSettings['defaultPseudoVersioningMethod'] == 'APKLinkHash'
|
||||||
? rel.hashCode.toString()
|
? rel.hashCode.toString()
|
||||||
|
Reference in New Issue
Block a user