File tree Expand file tree Collapse file tree
src/main/kotlin/app/morphe/gui/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66package app.morphe.gui.util
77
88import app.morphe.gui.data.constants.AppConstants.MORPHE_API_URL
9+ import io.ktor.http.encodeURLParameter
910import kotlinx.coroutines.CoroutineScope
1011import kotlinx.coroutines.Dispatchers
1112import kotlinx.coroutines.launch
@@ -18,7 +19,8 @@ object DownloadUrlResolver {
1819
1920 fun getWebSearchDownloadLink (packageName : String , version : String , architecture : String? = null): String {
2021 val architectureString = architecture ? : " all"
21- return " $MORPHE_API_URL /v2/web-search/$packageName :$version :$architectureString "
22+ val query = " $packageName ~$version ~$architectureString " .encodeURLParameter()
23+ return " $MORPHE_API_URL /v2/web-search/$query "
2224 }
2325
2426 fun openUrlAndFollowRedirects (url : String , handleResolvedUrl : (String ) -> Unit ) {
You can’t perform that action at this time.
0 commit comments