mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 02:05:56 +01:00
Fix CR comments & remove OS Validator
This commit is contained in:
@@ -18,12 +18,11 @@ import static at.pcgamingfreaks.mkvaudiosubtitlechanger.util.CommandLineOptionsU
|
||||
|
||||
public class ConfigLoader {
|
||||
private static final List<ConfigValidator<?>> VALIDATORS = List.of(
|
||||
new ConfigPathValidator(CONFIG_PATH, false, Path.of("./config.yaml").toFile()),
|
||||
new ConfigPathValidator(CONFIG_PATH, true, Path.of("./config.yaml").toFile()),
|
||||
new PathValidator(LIBRARY, true, null),
|
||||
new ThreadValidator(THREADS, false, 2),
|
||||
new MkvToolNixPathValidator(MKV_TOOL_NIX, true, Path.of("C:\\Program Files\\MKVToolNix").toFile()),
|
||||
new BooleanValidator(SAFE_MODE, false),
|
||||
new OperatingSystemValidator(WINDOWS),
|
||||
new PatternValidator(INCLUDE_PATTERN, false, Pattern.compile(".*")),
|
||||
new SetValidator(FORCED_KEYWORDS, false, true),
|
||||
new SetValidator(COMMENTARY_KEYWORDS, false, true),
|
||||
@@ -104,13 +103,4 @@ public class ConfigLoader {
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
private static File loadConfigPath(CommandLine cmd) {
|
||||
File configPath = new File(cmd.getOptionValue(CONFIG_PATH.prop(), "config.yaml"));
|
||||
if (configPath.isFile()) return configPath;
|
||||
|
||||
System.out.println("invalid config path");
|
||||
System.exit(1);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user