mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX][EXPERIMENTAL] Скачивание zip архивом
This commit is contained in:
parent
b98aba374a
commit
2e85180dc1
2 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||||
|
|
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue