mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
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:
parent
b5527a28db
commit
bfa7c4c9a8
5 changed files with 19 additions and 10 deletions
|
|
@ -52,7 +52,7 @@ public class CardLookup {
|
|||
if (result.isPresent()) {
|
||||
return result;
|
||||
}
|
||||
} catch (NumberFormatException ignored) {
|
||||
} catch (NumberFormatException ignore) {
|
||||
/* ignored */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public final class ThreadUtils {
|
|||
public static void sleep(int millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException ignored) {
|
||||
} catch (InterruptedException ignore) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue