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:
parent
549e2e47a3
commit
9c1ada6a9a
@ -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));
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user