[FIX][EXPERIMENTAL] Скачивание zip архивом

This commit is contained in:
Gravit 2019-05-15 20:01:42 +07:00
parent b98aba374a
commit 2e85180dc1
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
2 changed files with 9 additions and 3 deletions

View file

@ -281,7 +281,7 @@ public class NettyConfig {
public String downloadURL; public String downloadURL;
public String launcherEXEURL; public String launcherEXEURL;
public String address; public String address;
public Map<String, String> bindings = new HashMap<>(); public Map<String, NettyUpdatesBind> bindings = new HashMap<>();
public NettyPerformanceConfig performance; public NettyPerformanceConfig performance;
public NettyBindAddress[] binds; public NettyBindAddress[] binds;
public LogLevel logLevel = LogLevel.DEBUG; public LogLevel logLevel = LogLevel.DEBUG;

View file

@ -39,7 +39,13 @@ public void execute(ChannelHandlerContext ctx, Client client) {
return; return;
} }
String url = LaunchServer.server.config.netty.downloadURL.replace("%dirname%", dirName); 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); boolean zip = false;
service.sendObject(ctx, new UpdateRequestEvent(dir.object, url)); 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));
} }
} }