mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 22:09:47 -04:00
allow --action test for evaluation purposes
This commit is contained in:
parent
e4d99091e4
commit
95648bc859
@ -8,12 +8,12 @@ public enum LicenseModel {
|
|||||||
|
|
||||||
MicrosoftStore {
|
MicrosoftStore {
|
||||||
|
|
||||||
private final Resource<Boolean> CHECK = Resource.lazy(() -> !getAppUserModelID().equals("PointPlanck.FileBot"));
|
private final Resource<Boolean> AUMID = Resource.lazy(() -> getAppUserModelID().equals("PointPlanck.FileBot"));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object check() throws LicenseError {
|
public Object check() throws LicenseError {
|
||||||
try {
|
try {
|
||||||
if (CHECK.get()) {
|
if (!AUMID.get()) {
|
||||||
throw new LicenseError("Desktop Bridge not found");
|
throw new LicenseError("Desktop Bridge not found");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -26,12 +26,12 @@ public enum LicenseModel {
|
|||||||
|
|
||||||
MacAppStore {
|
MacAppStore {
|
||||||
|
|
||||||
private final Resource<Boolean> CHECK = Resource.lazy(() -> !File.listRoots()[0].canRead());
|
private final Resource<Boolean> SANDBOX = Resource.lazy(() -> !File.listRoots()[0].canRead());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object check() throws LicenseError {
|
public Object check() throws LicenseError {
|
||||||
try {
|
try {
|
||||||
if (CHECK.get()) {
|
if (!SANDBOX.get()) {
|
||||||
throw new LicenseError("Mac App Sandbox not found");
|
throw new LicenseError("Mac App Sandbox not found");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -576,7 +576,10 @@ public class CmdlineOperations implements CmdlineInterface {
|
|||||||
throw new CmdlineException("Failed to identify or process any files");
|
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
|
// rename files
|
||||||
Map<File, File> renameLog = new LinkedHashMap<File, File>();
|
Map<File, File> renameLog = new LinkedHashMap<File, File>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user