diff --git a/source/net/sourceforge/filebot/format/MediaBindingBean.java b/source/net/sourceforge/filebot/format/MediaBindingBean.java index 991bb85b..21e159de 100644 --- a/source/net/sourceforge/filebot/format/MediaBindingBean.java +++ b/source/net/sourceforge/filebot/format/MediaBindingBean.java @@ -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 getUserDefinedArguments() throws IOException { + return Settings.getApplicationArguments().defines; + } + + @Define("label") + public String getUserDefinedLabel() throws IOException { + for (Entry it : getUserDefinedArguments().entrySet()) { + if (it.getKey().endsWith("label")) { + return it.getValue(); + } + } + return null; + } + @Define("object") public Object getInfoObject() { return infoObject;