From 1da05c49bd4c63d54e8069527fd6eda9c013bd43 Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 3 Apr 2019 20:40:19 +0700 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20=D0=9F=D1=80=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B5=D0=B9=D1=88=D0=B0=D1=8F=20=D1=80=D0=B5=D0=BB=D0=B0=D0=B8?= =?UTF-8?q?=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20UpdateRequest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 1 + .../socket/websocket/json/update/UpdateResponse.java | 2 +- .../gravit/launcher/events/request/UpdateRequestEvent.java | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 27b3278c..b27255c9 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -247,6 +247,7 @@ public class NettyConfig { public int port; public boolean clientEnabled; public String launcherURL; + public String downloadURL; public String launcherEXEURL; public String address; } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/update/UpdateResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/update/UpdateResponse.java index 4c7ece96..e24e3eac 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/update/UpdateResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/update/UpdateResponse.java @@ -32,6 +32,6 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client } } } - service.sendObject(ctx, new UpdateRequestEvent(LaunchServer.server.updatesDirMap.get(dir).object)); + service.sendObject(ctx, new UpdateRequestEvent(LaunchServer.server.updatesDirMap.get(dir).object, LaunchServer.server.config.netty.downloadURL.concat(dir))); } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java index a56989fa..c409dd8f 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java @@ -18,4 +18,9 @@ public String getType() { public UpdateRequestEvent(HashedDir hdir) { this.hdir = hdir; } + + public UpdateRequestEvent(HashedDir hdir, String url) { + this.hdir = hdir; + this.url = url; + } }