download: improved images download from scryfall source:

- fixed wrong timeouts for api (fixed 429 Too Many Requests);
- added any/10 parallel threads support;
- current api limit is 1 request per 300 ms;
This commit is contained in:
Oleg Agafonov 2024-08-01 11:46:37 +04:00
parent b5527a28db
commit bfa7c4c9a8
5 changed files with 19 additions and 10 deletions

View file

@ -52,7 +52,7 @@ public class CardLookup {
if (result.isPresent()) {
return result;
}
} catch (NumberFormatException ignored) {
} catch (NumberFormatException ignore) {
/* ignored */
}

View file

@ -51,7 +51,7 @@ public final class ThreadUtils {
public static void sleep(int millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException ignored) {
} catch (InterruptedException ignore) {
}
}