mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 02:05:56 +01:00
Make InputConfig no longer be a singleton
This commit is contained in:
@@ -5,7 +5,6 @@ import at.pcgamingfreaks.mkvaudiosubtitlechanger.impl.validation.ValidFile;
|
||||
import at.pcgamingfreaks.mkvaudiosubtitlechanger.impl.validation.ValidMkvToolNix;
|
||||
import at.pcgamingfreaks.mkvaudiosubtitlechanger.util.FileUtils;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@@ -24,9 +23,6 @@ import picocli.CommandLine.Option;
|
||||
@NoArgsConstructor
|
||||
@CommandLine.Command
|
||||
public class InputConfig {
|
||||
@Getter(AccessLevel.NONE)
|
||||
@Setter(AccessLevel.NONE)
|
||||
private static InputConfig config = null;
|
||||
|
||||
private File configPath;
|
||||
|
||||
@@ -89,21 +85,6 @@ public class InputConfig {
|
||||
System.setProperty("DEFAULT_MKV_TOOL_NIX", SystemUtils.IS_OS_WINDOWS ? "C:\\Program Files\\MKVToolNix" : "/usr/bin/");
|
||||
}
|
||||
|
||||
public static InputConfig getInstance() {
|
||||
return getInstance(false);
|
||||
}
|
||||
|
||||
public static InputConfig getInstance(boolean reset) {
|
||||
if (config == null || reset) {
|
||||
config = new InputConfig();
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
public static void setInstance(InputConfig c) {
|
||||
config = c;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path to specific mkvtoolnix application.
|
||||
* @return absolute path to desired application.
|
||||
|
||||
Reference in New Issue
Block a user