From 00b863222b911c6d8081ca86f01d1b5f3b4af797 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 29 Sep 2020 18:10:10 -0700 Subject: [PATCH] import image urls if given. --- src/Command/ImportStdCommand.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Command/ImportStdCommand.php b/src/Command/ImportStdCommand.php index a1435e82..e987f7db 100644 --- a/src/Command/ImportStdCommand.php +++ b/src/Command/ImportStdCommand.php @@ -232,6 +232,9 @@ protected function importCards(array $cycles, array $multiNames, OutputInterface if (array_key_exists('errata', $item) && $item['errata']) { $data['text'] .= "\nErrata'd."; } + if (array_key_exists('imageUrl', $item)) { + $data['image_url'] = $item['imageUrl']; + } $data['traits'] = $item['traits'] ? implode('. ', $item['traits']) . '.' : ''; $data['type_code'] = $item['type']; $data['strength'] = null; @@ -279,7 +282,8 @@ protected function importCards(array $cycles, array $multiNames, OutputInterface 'illustrator', 'traits', 'cost', - 'octgn_id' + 'octgn_id', + 'image_url' ], $output );