From 2e85180dc1be8934d5cd56afeae569e0448178ed Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 15 May 2019 20:01:42 +0700 Subject: [PATCH] =?UTF-8?q?[FIX][EXPERIMENTAL]=20=D0=A1=D0=BA=D0=B0=D1=87?= =?UTF-8?q?=D0=B8=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20zip=20=D0=B0=D1=80=D1=85?= =?UTF-8?q?=D0=B8=D0=B2=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launchserver/LaunchServer.java | 2 +- .../websocket/json/update/UpdateResponse.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 962b2f4b..76629d4e 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -281,7 +281,7 @@ public class NettyConfig { public String downloadURL; public String launcherEXEURL; public String address; - public Map bindings = new HashMap<>(); + public Map bindings = new HashMap<>(); public NettyPerformanceConfig performance; public NettyBindAddress[] binds; public LogLevel logLevel = LogLevel.DEBUG; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/update/UpdateResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/update/UpdateResponse.java index 34d75c14..b326f1c0 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/update/UpdateResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/update/UpdateResponse.java @@ -39,7 +39,13 @@ public void execute(ChannelHandlerContext ctx, Client client) { return; } String url = LaunchServer.server.config.netty.downloadURL.replace("%dirname%", dirName); - if (server.config.netty.bindings.get(dirName) != null) url = server.config.netty.bindings.get(dirName); - service.sendObject(ctx, new UpdateRequestEvent(dir.object, url)); + boolean zip = false; + if (server.config.netty.bindings.get(dirName) != null) + { + LaunchServer.NettyUpdatesBind bind = server.config.netty.bindings.get(dirName); + url = bind.url; + zip = bind.zip; + } + service.sendObject(ctx, new UpdateRequestEvent(dir.object, url, zip)); } }