1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

allow --action test for evaluation purposes

This commit is contained in:
Reinhard Pointner 2018-06-23 14:48:10 +07:00
parent e4d99091e4
commit 95648bc859
2 changed files with 8 additions and 5 deletions

View File

@ -8,12 +8,12 @@ public enum LicenseModel {
MicrosoftStore {
private final Resource<Boolean> CHECK = Resource.lazy(() -> !getAppUserModelID().equals("PointPlanck.FileBot"));
private final Resource<Boolean> AUMID = Resource.lazy(() -> getAppUserModelID().equals("PointPlanck.FileBot"));
@Override
public Object check() throws LicenseError {
try {
if (CHECK.get()) {
if (!AUMID.get()) {
throw new LicenseError("Desktop Bridge not found");
}
} catch (Exception e) {
@ -26,12 +26,12 @@ public enum LicenseModel {
MacAppStore {
private final Resource<Boolean> CHECK = Resource.lazy(() -> !File.listRoots()[0].canRead());
private final Resource<Boolean> SANDBOX = Resource.lazy(() -> !File.listRoots()[0].canRead());
@Override
public Object check() throws LicenseError {
try {
if (CHECK.get()) {
if (!SANDBOX.get()) {
throw new LicenseError("Mac App Sandbox not found");
}
} catch (Exception e) {

View File

@ -576,7 +576,10 @@ public class CmdlineOperations implements CmdlineInterface {
throw new CmdlineException("Failed to identify or process any files");
}
LICENSE.check();
// allow --action test for evaluation purposes
if (renameAction != StandardRenameAction.TEST) {
LICENSE.check();
}
// rename files
Map<File, File> renameLog = new LinkedHashMap<File, File>();