Initial third party F-Droid repo support

Plus various bugfixes
And version increment
This commit is contained in:
Imran Remtulla
2022-12-15 21:22:03 -05:00
parent 6d0cac5894
commit f6ca5d42e8
19 changed files with 197 additions and 101 deletions

View File

@ -14,7 +14,7 @@ class GitLab extends AppSource {
RegExp standardUrlRegEx = RegExp('^https?://$host/[^/]+/[^/]+');
RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase());
if (match == null) {
throw InvalidURLError(runtimeType.toString());
throw InvalidURLError(name);
}
return url.substring(0, match.end);
}
@ -56,15 +56,9 @@ class GitLab extends AppSource {
if (version == null) {
throw NoVersionError();
}
return APKDetails(version, apkUrls);
return APKDetails(version, apkUrls, GitHub().getAppNames(standardUrl));
} else {
throw NoReleasesError();
}
}
@override
AppNames getAppNames(String standardUrl) {
// Same as GitHub
return GitHub().getAppNames(standardUrl);
}
}