From 588d488d37350e50d9b2b711fbfbb523f5c50dac Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 29 Nov 2019 22:41:08 +0100 Subject: [PATCH] add support for linking original and unlocked versions --- bin/import-game-data.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bin/import-game-data.php b/bin/import-game-data.php index 75841b6..bb3fef8 100755 --- a/bin/import-game-data.php +++ b/bin/import-game-data.php @@ -298,6 +298,15 @@ function buildDetails($game) } } + $buttons = []; + if (isset($game->links->unlocked)) { + $buttons[] = [ + 'text' => 'Show unlocked', + 'url' => 'ouya://launcher/details?app=' . $game->links->unlocked, + 'bold' => true, + ]; + } + // http://cweiske.de/ouya-store-api-docs.htm#get-https-devs-ouya-tv-api-v1-details return [ 'type' => 'Game', @@ -355,6 +364,7 @@ function buildDetails($game) ], 'promotedProduct' => null, + 'buttons' => $buttons, ]; } @@ -387,6 +397,11 @@ function addDiscoverRow(&$data, $title, $games) } else { //game + if (isset($game->links->original)) { + //do not link unlocked games. + // people an access them via the original games + continue; + } $tilePos = findTile($data['tiles'], $game->packageName); if ($tilePos === null) { $tilePos = count($data['tiles']); -- 2.30.2