* don't allow heavy abuse with simple commands
This commit is contained in:
parent
549e2e47a3
commit
9c1ada6a9a
|
@ -55,6 +55,11 @@ public class ArgumentProcessor {
|
||||||
|
|
||||||
// execute CLI operations
|
// execute CLI operations
|
||||||
if (args.script == null) {
|
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
|
// file operations
|
||||||
Collection<File> files = new LinkedHashSet<File>(args.getFiles(true));
|
Collection<File> files = new LinkedHashSet<File>(args.getFiles(true));
|
||||||
|
|
||||||
|
|
|
@ -771,7 +771,7 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||||
if (service instanceof OpenSubtitlesClient) {
|
if (service instanceof OpenSubtitlesClient) {
|
||||||
OpenSubtitlesClient osdb = (OpenSubtitlesClient) service;
|
OpenSubtitlesClient osdb = (OpenSubtitlesClient) service;
|
||||||
if (osdb.isAnonymous()) {
|
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
|
return true; // no login => logged in by default
|
||||||
|
|
Loading…
Reference in New Issue