mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 12:54:10 -07:00
Parse double-faced cards correctly.
This commit is contained in:
parent
7756673fcb
commit
c7d92f06cd
1 changed files with 5 additions and 1 deletions
|
|
@ -46,9 +46,13 @@ ArchidektApiResponseDeckDisplayWidget::ArchidektApiResponseDeckDisplayWidget(QWi
|
|||
QTextStream deckStream(&tempDeck);
|
||||
|
||||
for (auto card : response.getCards()) {
|
||||
QString fullName = card.getCard().getOracleCard().value("name").toString();
|
||||
// We don't really care about the second card, the card database already has it as a relation
|
||||
QString cleanName = fullName.split("//").first().trimmed();
|
||||
|
||||
tempDeck += QString("%1 %2 (%3) %4\n")
|
||||
.arg(card.getQuantity())
|
||||
.arg(card.getCard().getOracleCard().value("name").toString())
|
||||
.arg(cleanName)
|
||||
.arg(card.getCard().getEdition().getEditionCode())
|
||||
.arg(card.getCard().getCollectorNumber());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue