So we can use our own server, even when the apk urls in the game data
still point to archive.org
//default configuration values
$GLOBALS['packagelists'] = [];
//default configuration values
$GLOBALS['packagelists'] = [];
+$GLOBALS['urlRewrites'] = [];
$cfgFile = __DIR__ . '/../config.php';
if (file_exists($cfgFile)) {
include $cfgFile;
$cfgFile = __DIR__ . '/../config.php';
if (file_exists($cfgFile)) {
include $cfgFile;
'fileSize' => $release->size,
'version' => $release->uuid,
'contentRating' => $game->contentRating,
'fileSize' => $release->size,
'version' => $release->uuid,
'contentRating' => $game->contentRating,
- 'downloadLink' => $release->url,
+ 'downloadLink' => rewriteUrl($release->url),
+function rewriteUrl($url)
+{
+ foreach ($GLOBALS['urlRewrites'] as $pattern => $replacement) {
+ $url = preg_replace($pattern, $replacement, $url);
+ }
+ return $url;
+}
+
function writeJson($path, $data)
{
global $wwwDir;
function writeJson($path, $data)
{
global $wwwDir;
* Optional configuration file for import-game-data.php
* Copy it to config.php and adjust it.
*/
* Optional configuration file for import-game-data.php
* Copy it to config.php and adjust it.
*/
+$GLOBALS['urlRewrites'] = [
+ '#^https://archive.org/download/#' => 'https://statics.ouya.world/ia/',
+];
$GLOBALS['packagelists']["cweiske's picks"] = [
'de.eiswuxe.blookid2',
'com.cosmos.babyloniantwins',
$GLOBALS['packagelists']["cweiske's picks"] = [
'de.eiswuxe.blookid2',
'com.cosmos.babyloniantwins',