Keep original order of custom game lists
[stouyapi.git] / bin / import-game-data.php
index cfd16308e5eba6f93d3fbc634c39600d5d525271..182708a050e0337f3f3c5c06b4117efa7430ddbd 100755 (executable)
@@ -517,6 +517,7 @@ function buildDetails($game)
 
         'stouyapi' => [
             'internet-archive' => $iaUrl,
+            'developer-url'    => $game->developer->website ?? null,
         ]
     ];
 }
@@ -550,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);