mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Updated some logic.
This commit is contained in:
parent
7329dc6c3f
commit
c9327b718d
3 changed files with 1877 additions and 1590 deletions
|
|
@ -36,4 +36,12 @@ public interface CardImageSource {
|
||||||
default ArrayList<String> getSupportedSets() {
|
default ArrayList<String> getSupportedSets() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default boolean isSetSupportedComplete(String setCode) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean isImageProvided(String setCode, String cardName) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -294,9 +294,11 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
||||||
for (CardDownloadData data : allCardsMissingImage) {
|
for (CardDownloadData data : allCardsMissingImage) {
|
||||||
if ((data.isToken() && tokens)
|
if ((data.isToken() && tokens)
|
||||||
|| (!data.isToken() && selectedSetCodes != null && selectedSetCodes.contains(data.getSet()))) {
|
|| (!data.isToken() && selectedSetCodes != null && selectedSetCodes.contains(data.getSet()))) {
|
||||||
|
if (cardImageSource.isSetSupportedComplete(data.getSet()) || cardImageSource.isImageProvided(data.getSet(), data.getName())) {
|
||||||
cardsToDownload.add(data);
|
cardsToDownload.add(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
int numberTokenImagesAvailable = 0;
|
int numberTokenImagesAvailable = 0;
|
||||||
if (tokens) {
|
if (tokens) {
|
||||||
cardImageSource.getTokenImages();
|
cardImageSource.getTokenImages();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue