From 4e0c655538fd32af0ec44887c8beddf9429e328e Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Thu, 22 Dec 2022 08:01:26 -0500 Subject: [PATCH] F-Droid repo URL matching made more general (#188) --- README.md | 3 ++- lib/app_sources/fdroidrepo.dart | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d21466..e218721 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ Currently supported App sources: - [Signal](https://signal.org/) - [SourceForge](https://sourceforge.net/) - [APKMirror](https://apkmirror.com/) (Track-Only) -- Third Party F-Droid Repos (URLs ending with `/fdroid/repo`) +- Third Party F-Droid Repos + - Any URLs ending with `/fdroid/`, where `` can be anything - most often `repo` - [Steam](https://store.steampowered.com/mobile) ## Limitations diff --git a/lib/app_sources/fdroidrepo.dart b/lib/app_sources/fdroidrepo.dart index 0f63de5..0e9a7f7 100644 --- a/lib/app_sources/fdroidrepo.dart +++ b/lib/app_sources/fdroidrepo.dart @@ -22,7 +22,7 @@ class FDroidRepo extends AppSource { @override String standardizeURL(String url) { RegExp standardUrlRegExp = - RegExp('^https?://.+/fdroid/(repo(/|\\?)|repo\$)'); + RegExp('^https?://.+/fdroid/([^/]+(/|\\?)|[^/]+\$)'); RegExpMatch? match = standardUrlRegExp.firstMatch(url.toLowerCase()); if (match == null) { throw InvalidURLError(name);