Add language validation & refactor config initialization

This commit is contained in:
2022-04-18 15:07:56 +02:00
parent c2f32a30ce
commit a606c50637
10 changed files with 730 additions and 152 deletions

View File

@@ -14,10 +14,6 @@ public class AttributeConfig {
this.subtitleLanguage = subtitleLanguage;
}
public boolean isValid() {
return audioLanguage != null && subtitleLanguage != null;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("AttributeConfig{");

View File

@@ -1,15 +1,15 @@
package at.pcgamingfreaks.mkvaudiosubtitlechanger.model;
public enum ConfigProperty {
MKV_TOOL_NIX("mkvtoolnixPath", "Path to mkv tool nix installation"),
THREADS("threads", "thread count"),
FORCED_KEYWORDS("forcedKeywords", "Additional keywords to identify forced tracks\""),
CONFIG_PATH("config", "path to config"),
LIBRARY("library", "path to library"),
CONFIG_PATH("config", "Path to config file"),
LIBRARY("library", "Path to library"),
SAFE_MODE("safe-mode", "Test run (no files will be changes)"),
HELP("help", "\"for help this is\" - Yoda"),
EXCLUDE_DIRECTORY("exclude-directories", "Directories to exclude"),
INCLUDE_PATTERN("include-pattern", "Include files matching pattern");
THREADS("threads", "thread count (default: 2)"),
INCLUDE_PATTERN("include-pattern", "Include files matching pattern"),
MKV_TOOL_NIX("mkvtoolnix", "Path to mkv tool nix installation"),
FORCED_KEYWORDS("forcedKeywords", "Additional keywords to identify forced tracks, combines with config file"),
EXCLUDE_DIRECTORY("exclude-directories", "Directories to be excluded, combines with config file"),
HELP("help", "\"for help this is\" - Yoda");
private final String property;
private final String description;