mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-15 05:45:05 -05:00
* allow -Xflag syntax for boolean variable injection
This commit is contained in:
parent
61e8bd3c9a
commit
c0a9d70d5d
@ -106,7 +106,7 @@ public class ArgumentBean {
|
||||
public List<String> arguments = new ArrayList<String>();
|
||||
|
||||
// optional parameters
|
||||
public Map<String, String> parameters;
|
||||
public Map<String, Object> parameters;
|
||||
|
||||
|
||||
public boolean runCLI() {
|
||||
@ -140,7 +140,7 @@ public class ArgumentBean {
|
||||
// resolve given paths
|
||||
for (String argument : arguments) {
|
||||
File file = new File(argument).getAbsoluteFile();
|
||||
|
||||
|
||||
// resolve relative paths
|
||||
try {
|
||||
file = file.getCanonicalFile();
|
||||
|
@ -43,7 +43,7 @@ public class ArgumentProcessor {
|
||||
|
||||
if (args != null && args.length > 0) {
|
||||
List<String> arguments = new ArrayList<String>();
|
||||
Map<String, String> parameters = new HashMap<String, String>();
|
||||
Map<String, Object> parameters = new HashMap<String, Object>();
|
||||
|
||||
for (String it : args) {
|
||||
if (it.startsWith("-X")) {
|
||||
@ -51,7 +51,7 @@ public class ArgumentProcessor {
|
||||
if (pair.length == 2) {
|
||||
parameters.put(pair[0], pair[1]);
|
||||
} else if (pair.length == 1) {
|
||||
parameters.put(pair[0], "true");
|
||||
parameters.put(pair[0], Boolean.TRUE);
|
||||
}
|
||||
} else {
|
||||
arguments.add(it);
|
||||
|
Loading…
Reference in New Issue
Block a user