do not show "Make" apps in discover
[stouyapi.git] / bin / import-game-data.php
index cf6a047640861478b3758f4ac65b92bacd8afef8..2d0076e13af2f70a0bfde9fb9f5412a6e60d2b1f 100755 (executable)
@@ -77,14 +77,6 @@ foreach ($gameFiles as $gameFile) {
         'api/v1/games/' . $game->packageName . '/purchases',
         buildPurchases($game)
     );
-    /**/
-
-    /* this crashes babylonian twins
-    writeJson(
-        'api/v1/games/' . $game->packageName . '/purchases',
-        "{}\n"
-    );
-    */
 
     writeJson(
         'api/v1/apps/' . $game->packageName . '.json',
@@ -134,6 +126,7 @@ writeJson(
 
 function buildDiscover(array $games)
 {
+    $games = removeMakeGames($games);
     $data = [
         'title' => 'DISCOVER',
         'rows'  => [],
@@ -774,6 +767,11 @@ function getPromotedProduct($game)
     return null;
 }
 
+function removeMakeGames(array $games)
+{
+    return filterByGenre($games, 'Tutorials', true);
+}
+
 function removeMakeGenres($genres)
 {
     $filtered = [];