mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-14 13:25:10 -05:00
Formatting
This commit is contained in:
parent
a620f3f206
commit
6bbea7d075
@ -136,11 +136,14 @@ public class License {
|
|||||||
private static void verifyLicense(String id, String psm, boolean strict) throws Exception {
|
private static void verifyLicense(String id, String psm, boolean strict) throws Exception {
|
||||||
Cache cache = CacheManager.getInstance().getCache("license", CacheType.Persistent);
|
Cache cache = CacheManager.getInstance().getCache("license", CacheType.Persistent);
|
||||||
|
|
||||||
|
// force verify request
|
||||||
if (strict) {
|
if (strict) {
|
||||||
cache.clear();
|
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) {
|
if (getInteger(json, "status") != 200) {
|
||||||
throw new IllegalStateException(getString(json, "message"));
|
throw new IllegalStateException(getString(json, "message"));
|
||||||
|
Loading…
Reference in New Issue
Block a user