1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 16:35:08 -05:00

* don't allow heavy abuse with simple commands

This commit is contained in:
Reinhard Pointner 2014-10-29 04:21:33 +00:00
parent 549e2e47a3
commit 9c1ada6a9a
2 changed files with 6 additions and 1 deletions

View File

@ -55,6 +55,11 @@ public class ArgumentProcessor {
// execute CLI operations
if (args.script == null) {
// sanity checks
if (args.recursive && (args.getSubtitles || args.getMissingSubtitles)) {
throw new CmdlineException("-get-subtitles -r has been disabled due to abuse");
}
// file operations
Collection<File> files = new LinkedHashSet<File>(args.getFiles(true));

View File

@ -771,7 +771,7 @@ public class CmdlineOperations implements CmdlineInterface {
if (service instanceof OpenSubtitlesClient) {
OpenSubtitlesClient osdb = (OpenSubtitlesClient) service;
if (osdb.isAnonymous()) {
throw new CmdlineException(String.format("%s: Please enter your login details by calling `filebot -script fn:osdb.login`", osdb.getName()));
throw new CmdlineException(String.format("%s: Please enter your login details by calling `filebot -script fn:configure`", osdb.getName()));
}
}
return true; // no login => logged in by default