mirror of
https://github.com/mitb-archive/filebot
synced 2024-08-13 17:03:45 -04:00
checkLicense() helper method for scripts
This commit is contained in:
parent
edcea27d3e
commit
c565bc6705
@ -4,6 +4,7 @@ import static java.util.Arrays.*;
|
||||
import static java.util.Collections.*;
|
||||
import static java.util.stream.Collectors.*;
|
||||
import static net.filebot.Logging.*;
|
||||
import static net.filebot.Settings.*;
|
||||
import static net.filebot.media.XattrMetaInfo.*;
|
||||
import static net.filebot.util.FileUtilities.*;
|
||||
|
||||
@ -128,6 +129,14 @@ public abstract class ScriptShellBaseClass extends Script {
|
||||
return getShell().runScript(input, parameters);
|
||||
}
|
||||
|
||||
public boolean checkLicense() {
|
||||
try {
|
||||
return LICENSE.check() != null;
|
||||
} catch (Throwable e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public Object tryQuietly(Closure<?> c) {
|
||||
try {
|
||||
return c.call();
|
||||
|
Loading…
Reference in New Issue
Block a user