mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-21 18:03:45 +02:00
Bugfix (#954)
This commit is contained in:
@@ -120,14 +120,14 @@ class HTML extends AppSource {
|
|||||||
GeneratedFormTextField('matchGroupToUse',
|
GeneratedFormTextField('matchGroupToUse',
|
||||||
label: tr('matchGroupToUse'),
|
label: tr('matchGroupToUse'),
|
||||||
required: false,
|
required: false,
|
||||||
hint: '1',
|
hint: '0',
|
||||||
textInputType: const TextInputType.numberWithOptions(),
|
textInputType: const TextInputType.numberWithOptions(),
|
||||||
additionalValidators: [
|
additionalValidators: [
|
||||||
(value) {
|
(value) {
|
||||||
if (value?.isEmpty == true) {
|
if (value?.isEmpty == true) {
|
||||||
value = null;
|
value = null;
|
||||||
}
|
}
|
||||||
value ??= '1';
|
value ??= '0';
|
||||||
return intValidator(value);
|
return intValidator(value);
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
@@ -216,8 +216,12 @@ class HTML extends AppSource {
|
|||||||
if (match.isEmpty) {
|
if (match.isEmpty) {
|
||||||
throw NoVersionError();
|
throw NoVersionError();
|
||||||
}
|
}
|
||||||
version = match.last
|
String matchGroupString =
|
||||||
.group(int.parse(additionalSettings['matchGroupToUse'] as String));
|
(additionalSettings['matchGroupToUse'] as String).trim();
|
||||||
|
if (matchGroupString.isEmpty) {
|
||||||
|
matchGroupString = "0";
|
||||||
|
}
|
||||||
|
version = match.last.group(int.parse(matchGroupString));
|
||||||
if (version?.isEmpty == true) {
|
if (version?.isEmpty == true) {
|
||||||
throw NoVersionError();
|
throw NoVersionError();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user