+ new bindings {defines} and {label} for accessing --def options passed via cmdline
This commit is contained in:
parent
1a730c3ec6
commit
c4ba95b24b
|
@ -30,6 +30,7 @@ import java.util.regex.Pattern;
|
|||
import net.sourceforge.filebot.Cache;
|
||||
import net.sourceforge.filebot.Language;
|
||||
import net.sourceforge.filebot.MediaTypes;
|
||||
import net.sourceforge.filebot.Settings;
|
||||
import net.sourceforge.filebot.WebServices;
|
||||
import net.sourceforge.filebot.hash.HashType;
|
||||
import net.sourceforge.filebot.media.MetaAttributes;
|
||||
|
@ -697,6 +698,21 @@ public class MediaBindingBean {
|
|||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Define("defines")
|
||||
public Map<String, String> getUserDefinedArguments() throws IOException {
|
||||
return Settings.getApplicationArguments().defines;
|
||||
}
|
||||
|
||||
@Define("label")
|
||||
public String getUserDefinedLabel() throws IOException {
|
||||
for (Entry<String, String> it : getUserDefinedArguments().entrySet()) {
|
||||
if (it.getKey().endsWith("label")) {
|
||||
return it.getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Define("object")
|
||||
public Object getInfoObject() {
|
||||
return infoObject;
|
||||
|
|
Loading…
Reference in New Issue