* better logging
This commit is contained in:
parent
ffa1783e30
commit
425902f15d
|
@ -28,9 +28,6 @@ import java.util.logging.Level;
|
||||||
import javax.script.Bindings;
|
import javax.script.Bindings;
|
||||||
import javax.script.SimpleBindings;
|
import javax.script.SimpleBindings;
|
||||||
|
|
||||||
import org.kohsuke.args4j.CmdLineException;
|
|
||||||
import org.kohsuke.args4j.CmdLineParser;
|
|
||||||
|
|
||||||
import net.sourceforge.filebot.Analytics;
|
import net.sourceforge.filebot.Analytics;
|
||||||
import net.sourceforge.filebot.MediaTypes;
|
import net.sourceforge.filebot.MediaTypes;
|
||||||
import net.sourceforge.filebot.StandardRenameAction;
|
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.cli.ScriptShell.ScriptProvider;
|
||||||
import net.sourceforge.filebot.web.CachedResource;
|
import net.sourceforge.filebot.web.CachedResource;
|
||||||
|
|
||||||
|
import org.kohsuke.args4j.CmdLineException;
|
||||||
|
import org.kohsuke.args4j.CmdLineParser;
|
||||||
|
|
||||||
|
|
||||||
public class ArgumentProcessor {
|
public class ArgumentProcessor {
|
||||||
|
|
||||||
|
@ -218,14 +218,10 @@ public class ArgumentProcessor {
|
||||||
// check for local override
|
// check for local override
|
||||||
File local = new File(getApplicationFolder(), path);
|
File local = new File(getApplicationFolder(), path);
|
||||||
if (local.exists()) {
|
if (local.exists()) {
|
||||||
CLILogger.finest(String.format("[resolve] %s => %s", uri, local));
|
|
||||||
return new Script(readAll(new InputStreamReader(new FileInputStream(local), "UTF-8")), true);
|
return new Script(readAll(new InputStreamReader(new FileInputStream(local), "UTF-8")), true);
|
||||||
} else {
|
} else {
|
||||||
// script repository
|
// script repository
|
||||||
URL remote = new URL("http", "filebot.sourceforge.net", path);
|
url = new URL("http", "filebot.sourceforge.net", path).toString();
|
||||||
CLILogger.finest(String.format("[resolve] %s => %s", uri, remote));
|
|
||||||
|
|
||||||
url = remote.toString();
|
|
||||||
trusted = true;
|
trusted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -627,6 +627,7 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public List<File> getMissingSubtitles(Collection<File> files, String db, String query, final String languageName, String output, String csn, boolean strict) throws Exception {
|
public List<File> getMissingSubtitles(Collection<File> files, String db, String query, final String languageName, String output, String csn, boolean strict) throws Exception {
|
||||||
List<File> videoFiles = filter(filter(files, VIDEO_FILES), new FileFilter() {
|
List<File> videoFiles = filter(filter(files, VIDEO_FILES), new FileFilter() {
|
||||||
|
|
||||||
|
@ -928,6 +929,9 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> fetchEpisodeList(String query, String expression, String db, String sortOrderName, String languageName) throws Exception {
|
public List<String> 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
|
// find series on the web and fetch episode list
|
||||||
ExpressionFormat format = (expression != null) ? new ExpressionFormat(expression) : null;
|
ExpressionFormat format = (expression != null) ? new ExpressionFormat(expression) : null;
|
||||||
EpisodeListProvider service = (db == null) ? TVRage : getEpisodeListProvider(db);
|
EpisodeListProvider service = (db == null) ? TVRage : getEpisodeListProvider(db);
|
||||||
|
|
Loading…
Reference in New Issue