* @author Christian Weiske <cweiske@cweiske.de>
*/
ini_set('xdebug.halt_level', E_WARNING|E_NOTICE|E_USER_WARNING|E_USER_NOTICE);
+require_once __DIR__ . '/functions.php';
require_once __DIR__ . '/filters.php';
if (!isset($argv[1])) {
error('Pass the path to a "folders" file with game data json files folder names');
$product = buildProduct($gamePromoted);
}
+ $iaUrl = null;
+ if (isset($game->latestRelease->url)
+ && substr($game->latestRelease->url, 0, 29) == 'https://archive.org/download/'
+ ) {
+ $iaUrl = dirname($game->latestRelease->url) . '/';
+ }
+
// http://cweiske.de/ouya-store-api-docs.htm#get-https-devs-ouya-tv-api-v1-details
return [
'type' => 'Game',
'promotedProduct' => $product,
'buttons' => $buttons,
+
+ 'stouyapi' => [
+ 'internet-archive' => $iaUrl,
+ 'developer-url' => $game->developer->website ?? null,
+ ]
];
}
*/
function buildDeveloperProducts($products, $developer)
{
+ //remove duplicates
+ $products = array_values(array_column($products, null, 'identifier'));
+
$jsonProducts = [];
foreach ($products as $product) {
$jsonProducts[] = buildProduct($product);
];
}
-function categoryPath($title)
-{
- return str_replace(['/', '\\', ' ', '+', '?'], '_', $title);
-}
-
function getAllAges($games)
{
$ages = [];