Deduplicate developer products
authorChristian Weiske <cweiske@cweiske.de>
Tue, 9 Jun 2020 18:57:31 +0000 (20:57 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 9 Jun 2020 18:57:31 +0000 (20:57 +0200)
bin/import-game-data.php

index e90ccc9..182708a 100755 (executable)
@@ -551,6 +551,9 @@ function buildDeveloperProductOnly($product, $developer)
  */
 function buildDeveloperProducts($products, $developer)
 {
+    //remove duplicates
+    $products = array_values(array_column($products, null, 'identifier'));
+
     $jsonProducts = [];
     foreach ($products as $product) {
         $jsonProducts[] = buildProduct($product);