-
Notifications
You must be signed in to change notification settings - Fork 856
[minor] Scryfall image adjustments #14166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…resource heavy and modern hardware can handle it fine
|
These are unrelated commits so if merged should not be squashed. Some notes:
|
|
|
||
| static { | ||
| directLinks.put(cardbackFilename, "https://upload.wikimedia.org/wikipedia/en/a/aa/Magic_the_gathering-card_back.jpg"); | ||
| directLinks.put(cardbackFilename, "https://backs.scryfall.io/large/0/a/0aeebaf5-8c7d-4636-9e82-8c27447861f7.jpg"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong, do not use any guid or io links -- it's cdn related and can be changed any time by scryfall. Only api links must be used.
|
|
||
| // DOWNLOAD THREADS | ||
| uiDialog.getDownloadThreadsCombo().setModel(new DefaultComboBoxModel<>(new String[]{"10", "9", "8", "7", "6", "5", "4", "3", "2", "1"})); | ||
| uiDialog.getDownloadThreadsCombo().setModel(new DefaultComboBoxModel<>(new String[]{"100", "75", "50", "40", "30", "20", "15", "10", "5", "1"})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need such big values -- it can be unstable (zip storage mode easy to fail), also it can be banned by scryfall (it allow any rate limits on cdn/io links, but I don't trust it). So 1 - 20 are good.
| // TODO: can't find backface's api url so use direct link from third party site instead (must be replaced to scryfall someday) | ||
| res.add(createXmageToken(XMAGE_IMAGE_NAME_FACE_DOWN_MANUAL, 1, "https://upload.wikimedia.org/wikipedia/en/a/aa/Magic_the_gathering-card_back.jpg")); | ||
| // Can't find backface via the API, so use direct image link | ||
| res.add(createXmageToken(XMAGE_IMAGE_NAME_FACE_DOWN_MANUAL, 1, "https://backs.scryfall.io/large/0/a/0aeebaf5-8c7d-4636-9e82-8c27447861f7.jpg")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no guid links allow
| // Helper emblem (for global card hints) | ||
| // use backface for it | ||
| res.add(createXmageToken(XMAGE_IMAGE_NAME_HELPER_EMBLEM, 1, "https://upload.wikimedia.org/wikipedia/en/a/aa/Magic_the_gathering-card_back.jpg")); | ||
| res.add(createXmageToken(XMAGE_IMAGE_NAME_HELPER_EMBLEM, 1, "https://backs.scryfall.io/large/0/a/0aeebaf5-8c7d-4636-9e82-8c27447861f7.jpg")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no guid link allow
Handful of minor things;
backs.scryfall.io. You can pass in thecard_back_idto the URL which follows similar path conventions ascards.scryfall.io. This magic ID is the standard MTG card back, per their API.. Built a client locally and tested it renders correctly still.java:S2208which advises against wildcard imports.