Feat: add an option for disabling large downloads

This commit is contained in:
harlekin
2024-03-26 14:08:46 +00:00
committed by Laurent Clouet
parent c615c9b36d
commit a86c126d39
6 changed files with 49 additions and 12 deletions

View File

@@ -110,6 +110,7 @@ public class Worker {
@Option(name = SettingsLoader.ARG_HOSTNAME, usage = "Set a custom hostname name (name change will be lost when client is closed)", required = false) private String hostname = null;
@Option(name = SettingsLoader.ARG_HEADLESS, usage = "Mark your client manually as headless to block Eevee projects", required = false) private boolean headless = java.awt.GraphicsEnvironment.isHeadless();
@Option(name = SettingsLoader.ARG_DISABLE_LARGE_DOWNLOADS, usage = "Disable download of larger projects to preserve internet traffic", required = false) private boolean disableLargeDownloads = false;
public static void main(String[] args) {
if (OS.getOS() == null) {
@@ -447,6 +448,8 @@ public class Worker {
config.setConfigFilePath(config_file);
}
config.setDisableLargeDownloads(disableLargeDownloads);
SettingsLoader settingsLoader = new SettingsLoader(config_file);
settingsLoader.merge(config, true);