mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-23 09:29:41 +02:00
Make all sources override-eligible to account for subdomains
This commit is contained in:
@@ -7,7 +7,6 @@ import 'package:obtainium/providers/source_provider.dart';
|
|||||||
class Codeberg extends AppSource {
|
class Codeberg extends AppSource {
|
||||||
Codeberg() {
|
Codeberg() {
|
||||||
host = 'codeberg.org';
|
host = 'codeberg.org';
|
||||||
overrideEligible = true;
|
|
||||||
|
|
||||||
additionalSourceSpecificSettingFormItems = [];
|
additionalSourceSpecificSettingFormItems = [];
|
||||||
|
|
||||||
|
@@ -7,7 +7,6 @@ import 'package:obtainium/providers/source_provider.dart';
|
|||||||
class FDroidRepo extends AppSource {
|
class FDroidRepo extends AppSource {
|
||||||
FDroidRepo() {
|
FDroidRepo() {
|
||||||
name = tr('fdroidThirdPartyRepo');
|
name = tr('fdroidThirdPartyRepo');
|
||||||
overrideEligible = true;
|
|
||||||
|
|
||||||
additionalSourceAppSpecificSettingFormItems = [
|
additionalSourceAppSpecificSettingFormItems = [
|
||||||
[
|
[
|
||||||
|
@@ -13,7 +13,6 @@ import 'package:url_launcher/url_launcher_string.dart';
|
|||||||
class GitHub extends AppSource {
|
class GitHub extends AppSource {
|
||||||
GitHub() {
|
GitHub() {
|
||||||
host = 'github.com';
|
host = 'github.com';
|
||||||
overrideEligible = true;
|
|
||||||
|
|
||||||
additionalSourceSpecificSettingFormItems = [
|
additionalSourceSpecificSettingFormItems = [
|
||||||
GeneratedFormTextField('github-creds',
|
GeneratedFormTextField('github-creds',
|
||||||
|
@@ -14,7 +14,6 @@ import 'package:url_launcher/url_launcher_string.dart';
|
|||||||
class GitLab extends AppSource {
|
class GitLab extends AppSource {
|
||||||
GitLab() {
|
GitLab() {
|
||||||
host = 'gitlab.com';
|
host = 'gitlab.com';
|
||||||
overrideEligible = true;
|
|
||||||
canSearch = true;
|
canSearch = true;
|
||||||
|
|
||||||
additionalSourceSpecificSettingFormItems = [
|
additionalSourceSpecificSettingFormItems = [
|
||||||
|
@@ -85,10 +85,6 @@ bool _isNumeric(String s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class HTML extends AppSource {
|
class HTML extends AppSource {
|
||||||
HTML() {
|
|
||||||
overrideEligible = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
// TODO: implement requestHeaders choice, hardcoded for now
|
// TODO: implement requestHeaders choice, hardcoded for now
|
||||||
Map<String, String>? get requestHeaders => {
|
Map<String, String>? get requestHeaders => {
|
||||||
|
@@ -6,7 +6,6 @@ import 'package:obtainium/providers/source_provider.dart';
|
|||||||
|
|
||||||
class Jenkins extends AppSource {
|
class Jenkins extends AppSource {
|
||||||
Jenkins() {
|
Jenkins() {
|
||||||
overrideEligible = true;
|
|
||||||
overrideVersionDetectionFormDefault('releaseDateAsVersion', true);
|
overrideVersionDetectionFormDefault('releaseDateAsVersion', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -6,7 +6,6 @@ import 'package:obtainium/providers/source_provider.dart';
|
|||||||
class SourceForge extends AppSource {
|
class SourceForge extends AppSource {
|
||||||
SourceForge() {
|
SourceForge() {
|
||||||
host = 'sourceforge.net';
|
host = 'sourceforge.net';
|
||||||
overrideEligible = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@@ -9,7 +9,6 @@ import 'package:easy_localization/easy_localization.dart';
|
|||||||
class SourceHut extends AppSource {
|
class SourceHut extends AppSource {
|
||||||
SourceHut() {
|
SourceHut() {
|
||||||
host = 'git.sr.ht';
|
host = 'git.sr.ht';
|
||||||
overrideEligible = true;
|
|
||||||
|
|
||||||
additionalSourceAppSpecificSettingFormItems = [
|
additionalSourceAppSpecificSettingFormItems = [
|
||||||
[
|
[
|
||||||
|
@@ -321,10 +321,8 @@ class _AddAppPageState extends State<AddAppPage> {
|
|||||||
'overrideSource',
|
'overrideSource',
|
||||||
defaultValue: HTML().runtimeType.toString(),
|
defaultValue: HTML().runtimeType.toString(),
|
||||||
[
|
[
|
||||||
...sourceProvider.sources
|
...sourceProvider.sources.map(
|
||||||
.where((s) => s.overrideEligible)
|
(s) => MapEntry(s.runtimeType.toString(), s.name))
|
||||||
.map((s) =>
|
|
||||||
MapEntry(s.runtimeType.toString(), s.name))
|
|
||||||
],
|
],
|
||||||
label: tr('overrideSource'))
|
label: tr('overrideSource'))
|
||||||
]
|
]
|
||||||
|
@@ -317,7 +317,6 @@ abstract class AppSource {
|
|||||||
late String name;
|
late String name;
|
||||||
bool enforceTrackOnly = false;
|
bool enforceTrackOnly = false;
|
||||||
bool changeLogIfAnyIsMarkDown = true;
|
bool changeLogIfAnyIsMarkDown = true;
|
||||||
bool overrideEligible = false;
|
|
||||||
|
|
||||||
AppSource() {
|
AppSource() {
|
||||||
name = runtimeType.toString();
|
name = runtimeType.toString();
|
||||||
|
Reference in New Issue
Block a user