mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-24 16:57:15 -04:00
[db] Handle fdroidrepos:// Uris as well
This commit is contained in:
committed by
Michael Pöhn
parent
7b52db331c
commit
03a5b697bb
@@ -7,7 +7,18 @@ internal object RepoUriGetter {
|
||||
|
||||
fun getUri(url: String): NormalizedUri {
|
||||
val uri = Uri.parse(url).let {
|
||||
if (it.host == "fdroid.link") getFdroidLinkUri(it) else it
|
||||
when {
|
||||
it.scheme.equals("fdroidrepos", ignoreCase = true) -> {
|
||||
it.buildUpon().scheme("https").build()
|
||||
}
|
||||
|
||||
it.scheme.equals("fdroidrepo", ignoreCase = true) -> {
|
||||
it.buildUpon().scheme("http").build()
|
||||
}
|
||||
|
||||
it.host == "fdroid.link" -> getFdroidLinkUri(it)
|
||||
else -> it
|
||||
}
|
||||
}
|
||||
val fingerprint = uri.getQueryParameter("fingerprint")?.lowercase()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user