* GUI: double faced cards improves:

* fixed images download for alternative prints (#9826, #9701);
 * fixed wrong pair of main and second side arts for alternative prints;
This commit is contained in:
Oleg Agafonov 2023-03-11 17:35:18 +04:00
parent 18a3ec5247
commit 4e9ffdfaf9
12 changed files with 59 additions and 32 deletions

View file

@ -456,7 +456,7 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
throw new IllegalStateException("Second side card can't have empty name.");
}
CardInfo secondSideCard = CardRepository.instance.findCardWPreferredSet(card.getSecondSideName(), card.getSetCode());
CardInfo secondSideCard = CardRepository.instance.findCardWithPreferredSetAndNumber(card.getSecondSideName(), card.getSetCode(), card.getCardNumber());
if (secondSideCard == null) {
throw new IllegalStateException("Can''t find second side card in database: " + card.getSecondSideName());
}
@ -490,7 +490,7 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
throw new IllegalStateException("MeldsToCardName can't be empty in " + card.getName());
}
CardInfo meldsToCard = CardRepository.instance.findCardWPreferredSet(card.getMeldsToCardName(), card.getSetCode());
CardInfo meldsToCard = CardRepository.instance.findCardWithPreferredSetAndNumber(card.getMeldsToCardName(), card.getSetCode(), card.getCardNumber());
if (meldsToCard == null) {
throw new IllegalStateException("Can''t find meldsToCard in database: " + card.getMeldsToCardName());
}