diff --git a/source/net/sourceforge/filebot/cli/ArgumentProcessor.java b/source/net/sourceforge/filebot/cli/ArgumentProcessor.java index ab8a4489..4a18328e 100644 --- a/source/net/sourceforge/filebot/cli/ArgumentProcessor.java +++ b/source/net/sourceforge/filebot/cli/ArgumentProcessor.java @@ -28,9 +28,6 @@ import java.util.logging.Level; import javax.script.Bindings; import javax.script.SimpleBindings; -import org.kohsuke.args4j.CmdLineException; -import org.kohsuke.args4j.CmdLineParser; - import net.sourceforge.filebot.Analytics; import net.sourceforge.filebot.MediaTypes; import net.sourceforge.filebot.StandardRenameAction; @@ -38,6 +35,9 @@ import net.sourceforge.filebot.cli.ScriptShell.Script; import net.sourceforge.filebot.cli.ScriptShell.ScriptProvider; import net.sourceforge.filebot.web.CachedResource; +import org.kohsuke.args4j.CmdLineException; +import org.kohsuke.args4j.CmdLineParser; + public class ArgumentProcessor { @@ -218,14 +218,10 @@ public class ArgumentProcessor { // check for local override File local = new File(getApplicationFolder(), path); if (local.exists()) { - CLILogger.finest(String.format("[resolve] %s => %s", uri, local)); return new Script(readAll(new InputStreamReader(new FileInputStream(local), "UTF-8")), true); } else { // script repository - URL remote = new URL("http", "filebot.sourceforge.net", path); - CLILogger.finest(String.format("[resolve] %s => %s", uri, remote)); - - url = remote.toString(); + url = new URL("http", "filebot.sourceforge.net", path).toString(); trusted = true; } } diff --git a/source/net/sourceforge/filebot/cli/CmdlineOperations.java b/source/net/sourceforge/filebot/cli/CmdlineOperations.java index d3027a98..3695f7da 100644 --- a/source/net/sourceforge/filebot/cli/CmdlineOperations.java +++ b/source/net/sourceforge/filebot/cli/CmdlineOperations.java @@ -627,6 +627,7 @@ public class CmdlineOperations implements CmdlineInterface { } + @Override public List getMissingSubtitles(Collection files, String db, String query, final String languageName, String output, String csn, boolean strict) throws Exception { List videoFiles = filter(filter(files, VIDEO_FILES), new FileFilter() { @@ -928,6 +929,9 @@ public class CmdlineOperations implements CmdlineInterface { @Override public List fetchEpisodeList(String query, String expression, String db, String sortOrderName, String languageName) throws Exception { + if (query == null || query.isEmpty()) + throw new IllegalArgumentException("query is not defined"); + // find series on the web and fetch episode list ExpressionFormat format = (expression != null) ? new ExpressionFormat(expression) : null; EpisodeListProvider service = (db == null) ? TVRage : getEpisodeListProvider(db);