X-Git-Url: https://git.cweiske.de/stouyapi.git/blobdiff_plain/8152f8333874a70dbc8682bc2766129886dd8304..3628cc39c1185b3deba69550ba64f8f4d9f563a3:/bin/build-html.php diff --git a/bin/build-html.php b/bin/build-html.php index 3f6fa4b..1f6c87c 100755 --- a/bin/build-html.php +++ b/bin/build-html.php @@ -62,6 +62,7 @@ function renderAllGamesList($detailsFiles) 'title' => $json->title, 'genres' => $json->genres, 'developer' => $json->developer->name, + 'developerUrl' => $json->stouyapi->{'developer-url'} ?? null, 'suggestedAge' => $json->suggestedAge, 'apkVersion' => $json->version->number, 'apkTimestamp' => $json->version->publishedAt, @@ -91,6 +92,8 @@ function renderDiscoverFile($discoverFile) $json = json_decode(file_get_contents($discoverFile)); $title = $json->title . ' OUYA games'; + $subtitle = $json->stouyapi->subtitle ?? null; + $sections = []; foreach ($json->rows as $row) { $section = (object) [ @@ -159,7 +162,25 @@ function renderGameFile($gameDataFile) $appsDir . $json->version->uuid . '-download.json' ) ); + $apkDownloadUrl = $downloadJson->app->downloadLink; + /* + if (isset($json->premium) && $json->premium) { + $apkDownloadUrl = null; + } + */ + $developerDetailsUrl = null; + if (isset($json->developer->url) && $json->developer->url) { + $developerDetailsUrl = '../discover/' . str_replace( + 'ouya://launcher/discover/', + '', + $json->developer->url + ) . '.htm'; + } + + $internetArchiveUrl = $json->stouyapi->{'internet-archive'} ?? null; + $developerUrl = $json->stouyapi->{'developer-url'} ?? null; + $pushUrl = $GLOBALS['pushToMyOuyaUrl'] . '?game=' . urlencode($json->apk->package);