diff --git a/lib/app_sources/apkcombo.dart b/lib/app_sources/apkcombo.dart index 6da5550..1a58847 100644 --- a/lib/app_sources/apkcombo.dart +++ b/lib/app_sources/apkcombo.dart @@ -10,9 +10,10 @@ class APKCombo extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/+[^/]+/+[^/]+'); - var match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/+[^/]+/+[^/]+', + caseSensitive: false); + var match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/apkmirror.dart b/lib/app_sources/apkmirror.dart index 3e6bfd8..4e3cd1f 100644 --- a/lib/app_sources/apkmirror.dart +++ b/lib/app_sources/apkmirror.dart @@ -32,9 +32,10 @@ class APKMirror extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/apk/[^/]+/[^/]+'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/apk/[^/]+/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/apkpure.dart b/lib/app_sources/apkpure.dart index ae84f4d..92dff43 100644 --- a/lib/app_sources/apkpure.dart +++ b/lib/app_sources/apkpure.dart @@ -27,15 +27,17 @@ class APKPure extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegExB = - RegExp('^https?://m.${getSourceRegex(hosts)}/+[^/]+/+[^/]+(/+[^/]+)?'); - RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase()); + RegExp standardUrlRegExB = RegExp( + '^https?://m.${getSourceRegex(hosts)}/+[^/]+/+[^/]+(/+[^/]+)?', + caseSensitive: false); + RegExpMatch? match = standardUrlRegExB.firstMatch(url); if (match != null) { url = 'https://${getSourceRegex(hosts)}${Uri.parse(url).path}'; } RegExp standardUrlRegExA = RegExp( - '^https?://(www\\.)?${getSourceRegex(hosts)}/+[^/]+/+[^/]+(/+[^/]+)?'); - match = standardUrlRegExA.firstMatch(url.toLowerCase()); + '^https?://(www\\.)?${getSourceRegex(hosts)}/+[^/]+/+[^/]+(/+[^/]+)?', + caseSensitive: false); + match = standardUrlRegExA.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/aptoide.dart b/lib/app_sources/aptoide.dart index 84dc575..a2795d6 100644 --- a/lib/app_sources/aptoide.dart +++ b/lib/app_sources/aptoide.dart @@ -14,9 +14,10 @@ class Aptoide extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://([^\\.]+\\.){2,}${getSourceRegex(hosts)}'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://([^\\.]+\\.){2,}${getSourceRegex(hosts)}', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/codeberg.dart b/lib/app_sources/codeberg.dart index 9e9b7b6..bf01701 100644 --- a/lib/app_sources/codeberg.dart +++ b/lib/app_sources/codeberg.dart @@ -16,9 +16,10 @@ class Codeberg extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/[^/]+/[^/]+'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/[^/]+/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/fdroid.dart b/lib/app_sources/fdroid.dart index fb40a90..9129f3c 100644 --- a/lib/app_sources/fdroid.dart +++ b/lib/app_sources/fdroid.dart @@ -38,15 +38,17 @@ class FDroid extends AppSource { @override String sourceSpecificStandardizeURL(String url) { RegExp standardUrlRegExB = RegExp( - '^https?://(www\\.)?${getSourceRegex(hosts)}/+[^/]+/+packages/+[^/]+'); - RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase()); + '^https?://(www\\.)?${getSourceRegex(hosts)}/+[^/]+/+packages/+[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegExB.firstMatch(url); if (match != null) { url = 'https://${Uri.parse(match.group(0)!).host}/packages/${Uri.parse(url).pathSegments.last}'; } - RegExp standardUrlRegExA = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/+packages/+[^/]+'); - match = standardUrlRegExA.firstMatch(url.toLowerCase()); + RegExp standardUrlRegExA = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/+packages/+[^/]+', + caseSensitive: false); + match = standardUrlRegExA.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/github.dart b/lib/app_sources/github.dart index 99a566a..7c0e19d 100644 --- a/lib/app_sources/github.dart +++ b/lib/app_sources/github.dart @@ -150,9 +150,10 @@ class GitHub extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/[^/]+/[^/]+'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/[^/]+/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/gitlab.dart b/lib/app_sources/gitlab.dart index 63fc2fe..0b7776f 100644 --- a/lib/app_sources/gitlab.dart +++ b/lib/app_sources/gitlab.dart @@ -52,9 +52,10 @@ class GitLab extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/[^/]+/[^/]+'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/[^/]+/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/huaweiappgallery.dart b/lib/app_sources/huaweiappgallery.dart index 6859d27..54ab2ec 100644 --- a/lib/app_sources/huaweiappgallery.dart +++ b/lib/app_sources/huaweiappgallery.dart @@ -13,9 +13,10 @@ class HuaweiAppGallery extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/app/[^/]+'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/app/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/izzyondroid.dart b/lib/app_sources/izzyondroid.dart index dcc4cbb..ace8ed1 100644 --- a/lib/app_sources/izzyondroid.dart +++ b/lib/app_sources/izzyondroid.dart @@ -15,13 +15,15 @@ class IzzyOnDroid extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegExA = - RegExp('^https?://android.${getSourceRegex(hosts)}/repo/apk/[^/]+'); - RegExpMatch? match = standardUrlRegExA.firstMatch(url.toLowerCase()); + RegExp standardUrlRegExA = RegExp( + '^https?://android.${getSourceRegex(hosts)}/repo/apk/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegExA.firstMatch(url); if (match == null) { RegExp standardUrlRegExB = RegExp( - '^https?://apt.${getSourceRegex(hosts)}/fdroid/index/apk/[^/]+'); - match = standardUrlRegExB.firstMatch(url.toLowerCase()); + '^https?://apt.${getSourceRegex(hosts)}/fdroid/index/apk/[^/]+', + caseSensitive: false); + match = standardUrlRegExB.firstMatch(url); } if (match == null) { throw InvalidURLError(name); diff --git a/lib/app_sources/jenkins.dart b/lib/app_sources/jenkins.dart index ea074cf..8e817db 100644 --- a/lib/app_sources/jenkins.dart +++ b/lib/app_sources/jenkins.dart @@ -8,6 +8,7 @@ class Jenkins extends AppSource { Jenkins() { overrideVersionDetectionFormDefault('releaseDateAsVersion', disableStandard: true); + neverAutoSelect = true; } String trimJobUrl(String url) { diff --git a/lib/app_sources/mullvad.dart b/lib/app_sources/mullvad.dart index 9a4488b..3b0439d 100644 --- a/lib/app_sources/mullvad.dart +++ b/lib/app_sources/mullvad.dart @@ -11,9 +11,10 @@ class Mullvad extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/neutroncode.dart b/lib/app_sources/neutroncode.dart index 7b9af33..b0f2d93 100644 --- a/lib/app_sources/neutroncode.dart +++ b/lib/app_sources/neutroncode.dart @@ -11,8 +11,9 @@ class NeutronCode extends AppSource { @override String sourceSpecificStandardizeURL(String url) { RegExp standardUrlRegEx = RegExp( - '^https?://(www\\.)?${getSourceRegex(hosts)}/downloads/file/[^/]+'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + '^https?://(www\\.)?${getSourceRegex(hosts)}/downloads/file/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/sourceforge.dart b/lib/app_sources/sourceforge.dart index 055fb93..52f6aca 100644 --- a/lib/app_sources/sourceforge.dart +++ b/lib/app_sources/sourceforge.dart @@ -10,16 +10,18 @@ class SourceForge extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegExB = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/p/[^/]+'); - RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase()); + RegExp standardUrlRegExB = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/p/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegExB.firstMatch(url); if (match != null) { url = 'https://${Uri.parse(match.group(0)!).host}/projects/${url.substring(Uri.parse(match.group(0)!).host.length + '/projects/'.length + 1)}'; } - RegExp standardUrlRegExA = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/projects/[^/]+'); - match = standardUrlRegExA.firstMatch(url.toLowerCase()); + RegExp standardUrlRegExA = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/projects/[^/]+', + caseSensitive: false); + match = standardUrlRegExA.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/sourcehut.dart b/lib/app_sources/sourcehut.dart index 6b0e098..bb19b96 100644 --- a/lib/app_sources/sourcehut.dart +++ b/lib/app_sources/sourcehut.dart @@ -20,9 +20,10 @@ class SourceHut extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://(www\\.)?${getSourceRegex(hosts)}/[^/]+/[^/]+'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://(www\\.)?${getSourceRegex(hosts)}/[^/]+/[^/]+', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); } diff --git a/lib/app_sources/uptodown.dart b/lib/app_sources/uptodown.dart index 37acba9..fe3d589 100644 --- a/lib/app_sources/uptodown.dart +++ b/lib/app_sources/uptodown.dart @@ -13,9 +13,10 @@ class Uptodown extends AppSource { @override String sourceSpecificStandardizeURL(String url) { - RegExp standardUrlRegEx = - RegExp('^https?://([^\\.]+\\.){2,}${getSourceRegex(hosts)}'); - RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase()); + RegExp standardUrlRegEx = RegExp( + '^https?://([^\\.]+\\.){2,}${getSourceRegex(hosts)}', + caseSensitive: false); + RegExpMatch? match = standardUrlRegEx.firstMatch(url); if (match == null) { throw InvalidURLError(name); }