1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-13 04:45:01 -05:00

Formatting

This commit is contained in:
Reinhard Pointner 2019-02-15 14:08:37 +07:00
parent a620f3f206
commit 6bbea7d075

View File

@ -136,11 +136,14 @@ public class License {
private static void verifyLicense(String id, String psm, boolean strict) throws Exception {
Cache cache = CacheManager.getInstance().getCache("license", CacheType.Persistent);
// force verify request
if (strict) {
cache.clear();
}
Object json = cache.json(id, i -> new URL("https://license.filebot.net/verify/" + i)).fetch((url, modified) -> WebRequest.post(url, psm.getBytes(UTF_8), "application/octet-stream", getRequestParameters())).expire(Cache.ONE_MONTH).get();
Object json = cache.json(id, i -> new URL("https://license.filebot.net/verify/" + i)).fetch((url, modified) -> {
return WebRequest.post(url, psm.getBytes(UTF_8), "application/octet-stream", getRequestParameters());
}).expire(Cache.ONE_MONTH).get();
if (getInteger(json, "status") != 200) {
throw new IllegalStateException(getString(json, "message"));