This commit is contained in:
sirjonasxx 2021-08-20 02:58:14 +02:00
parent c0a6e3d617
commit e1ab090852

View File

@ -102,7 +102,8 @@ public class StoreExtensionTools {
public static void installExtension(String name, StoreRepository storeRepository, InstallExtListener listener) { public static void installExtension(String name, StoreRepository storeRepository, InstallExtListener listener) {
new Thread(() -> { new Thread(() -> {
String downloadUrl = String.format("https://github.com/sirjonasxx/G-ExtensionStore/raw/repo/%s/store/extensions/%s/extension.zip", storeRepository.getRepoVersion(), name); String downloadUrl = String.format("https://github.com/sirjonasxx/G-ExtensionStore/raw/repo/%s/store/extensions/%s/extension.zip", storeRepository.getRepoVersion(),
EncodingUtil.encodeURIComponent(name));
Optional<StoreExtension> maybeExt = storeRepository.getExtensions().stream().filter(e -> e.getTitle().equals(name)).findFirst(); Optional<StoreExtension> maybeExt = storeRepository.getExtensions().stream().filter(e -> e.getTitle().equals(name)).findFirst();
if (maybeExt.isPresent()) { if (maybeExt.isPresent()) {
StoreExtension ext = maybeExt.get(); StoreExtension ext = maybeExt.get();