mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-01 05:10:15 +02:00
Rename "Version String Extraction" to "Trim Version String" for non-HTML Sources (#1723)
Rename Codeberg to Forgejo (#1722)
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:obtainium/providers/source_provider.dart';
|
||||
class Codeberg extends AppSource {
|
||||
GitHub gh = GitHub();
|
||||
Codeberg() {
|
||||
name = 'Forgejo (Codeberg)';
|
||||
hosts = ['codeberg.org'];
|
||||
|
||||
additionalSourceAppSpecificSettingFormItems =
|
||||
|
@@ -93,6 +93,21 @@ bool _isNumeric(String s) {
|
||||
}
|
||||
|
||||
class HTML extends AppSource {
|
||||
@override
|
||||
List<List<GeneratedFormItem>> get combinedAppSpecificSettingFormItems {
|
||||
return super.combinedAppSpecificSettingFormItems.map((r) {
|
||||
return r.map((e) {
|
||||
if (e.key == 'versionExtractionRegEx') {
|
||||
e.label = tr('versionExtractionRegEx');
|
||||
}
|
||||
if (e.key == 'matchGroupToUse') {
|
||||
e.label = tr('matchGroupToUse');
|
||||
}
|
||||
return e;
|
||||
}).toList();
|
||||
}).toList();
|
||||
}
|
||||
|
||||
var finalStepFormitems = [
|
||||
[
|
||||
GeneratedFormTextField('customLinkFilterRegex',
|
||||
|
@@ -493,13 +493,15 @@ abstract class AppSource {
|
||||
],
|
||||
[
|
||||
GeneratedFormTextField('versionExtractionRegEx',
|
||||
label: tr('versionExtractionRegEx'),
|
||||
label: tr('trimVersionString'),
|
||||
required: false,
|
||||
additionalValidators: [(value) => regExValidator(value)]),
|
||||
],
|
||||
[
|
||||
GeneratedFormTextField('matchGroupToUse',
|
||||
label: tr('matchGroupToUse'), required: false, hint: '\$0')
|
||||
label: tr('matchGroupToUseForX', args: [tr('trimVersionString')]),
|
||||
required: false,
|
||||
hint: '\$0')
|
||||
],
|
||||
[
|
||||
GeneratedFormSwitch('versionDetection',
|
||||
|
Reference in New Issue
Block a user