diff --git a/.env.dist b/.env.dist index 9ec146f8d..d420c5eb7 100644 --- a/.env.dist +++ b/.env.dist @@ -147,7 +147,6 @@ TMDB_CACHE=${TMDB_CACHE} TMDB_LOG=${TMDB_LOG} TVDB_APIKEY=${TVDB_APIKEY} TVDB_PIN=${TVDB_PIN} -GIANTBOMB_APIKEY=${GIANTBOMB_APIKEY} ANIDB_APIKEY=${ANIDB_APIKEY} FANARTTV_APIKEY=${FANARTTV_APIKEY} OMDB_APIKEY=${OMDB_APIKEY} diff --git a/.env.example b/.env.example index 7d6080960..e32a02f4c 100644 --- a/.env.example +++ b/.env.example @@ -149,7 +149,6 @@ TMDB_CACHE=false TMDB_LOG=false TVDB_APIKEY=ef6fb572-bcee-4d99-9b52-90549ad7553a TVDB_PIN= -GIANTBOMB_APIKEY= ANIDB_APIKEY= FANARTTV_APIKEY= OMDB_APIKEY= diff --git a/Blacklight/Games.php b/Blacklight/Games.php index 35e628e79..56c3c0084 100755 --- a/Blacklight/Games.php +++ b/Blacklight/Games.php @@ -7,11 +7,6 @@ use App\Models\GamesInfo; use App\Models\Genre; use App\Models\Release; use App\Models\Settings; -use DBorsatto\GiantBomb\Client; -use DBorsatto\GiantBomb\Configuration; -use DBorsatto\GiantBomb\Exception\ApiCallerException; -use DBorsatto\GiantBomb\Exception\ModelException; -use DBorsatto\GiantBomb\Exception\SdkException; use GuzzleHttp\Exception\ClientException; use Illuminate\Contracts\Pagination\LengthAwarePaginator; use Illuminate\Database\Eloquent\Model; @@ -69,10 +64,6 @@ class Games public string $catWhere; - protected Configuration $config; - - protected Client $giantBomb; - protected $igdbSleep; protected ColorCLI $colorCli; @@ -86,20 +77,13 @@ class Games public function __construct() { $this->echoOutput = config('nntmux.echocli'); - $this->colorCli = new ColorCLI; - - $this->publicKey = config('nntmux_api.giantbomb_api_key'); $this->gameQty = Settings::settingValue('maxgamesprocessed') !== '' ? (int) Settings::settingValue('maxgamesprocessed') : 150; $this->imgSavePath = config('nntmux_settings.covers_path').'/games/'; $this->renamed = (int) Settings::settingValue('lookupgames') === 2 ? 'AND isrenamed = 1' : ''; $this->matchPercentage = 60; $this->maxHitRequest = false; $this->catWhere = 'AND categories_id = '.Category::PC_GAMES.' '; - if ($this->publicKey !== '') { - $this->config = new Configuration($this->publicKey); - $this->giantBomb = new Client($this->config); - } } /** @@ -321,7 +305,7 @@ class Games $game = []; - // Process Steam first before GiantBomb as Steam has more details + // Process Steam first as Steam has more details $this->_gameResults = false; $genreName = ''; $this->_getGame = new Steam(['DB' => null]); @@ -376,79 +360,6 @@ class Games } } - if (! empty($this->publicKey)) { - if ($steamGameID === false || $this->_gameResults === false) { - $bestMatch = false; - $this->_classUsed = 'GiantBomb'; - try { - $result = $this->giantBomb->search($gameInfo['title'], 'Game'); - if (! \is_object($result)) { - $bestMatchPct = 0; - $normQuery = $this->normalizeForMatch($gameInfo['title']); - foreach ($result as $res) { - $score1 = $this->computeSimilarity($normQuery, $this->normalizeForMatch($res->name)); - if ($score1 >= self::GAME_MATCH_PERCENTAGE && $score1 > $bestMatchPct) { - $bestMatch = $res->id; - $bestMatchPct = $score1; - } - } - - if ($bestMatch !== false) { - $this->_gameResults = $this->giantBomb->findWithResourceID('Game', '3030-'.$bestMatch); - - if (! empty($this->_gameResults->image['medium_url'])) { - $game['coverurl'] = (string) $this->_gameResults->image['medium_url']; - } - - if (! empty($this->_gameResults->image['screen_url'])) { - $game['backdropurl'] = (string) $this->_gameResults->image['screen_url']; - } - - $game['title'] = (string) $this->_gameResults->get('name'); - $game['asin'] = $this->_gameResults->get('id'); - if (! empty($this->_gameResults->get('site_detail_url'))) { - $game['url'] = (string) $this->_gameResults->get('site_detail_url'); - } else { - $game['url'] = ''; - } - - if ($this->_gameResults->get('publishers') !== '') { - $game['publisher'] = $this->_gameResults->publishers[0]['name'] ?? 'Unknown'; - } else { - $game['publisher'] = 'Unknown'; - } - - if (! empty($this->_gameResults->original_game_rating[0]['name'])) { - $game['esrb'] = $this->_gameResults->original_game_rating[0]['name'] ?? 'Not Rated'; - } else { - $game['esrb'] = 'Not Rated'; - } - - if ($this->_gameResults->original_release_date !== '' && strtotime($this->_gameResults->original_release_date !== false)) { - $dateReleased = $this->_gameResults->original_release_date; - $date = $dateReleased !== null ? Carbon::createFromFormat('Y-m-d H:i:s', $dateReleased) : now(); - $game['releasedate'] = (string) $date->format('Y-m-d'); - } - - if ($this->_gameResults->deck !== '') { - $game['review'] = (string) $this->_gameResults->deck; - } - } else { - $this->colorCli->notice('GiantBomb returned no valid results'); - - return false; - } - } else { - $this->colorCli->notice('GiantBomb found no valid results'); - - return false; - } - } catch (ApiCallerException $e) { - return false; - } - } - } - if (config('config.credentials.client_id') !== '' && config('config.credentials.client_secret') !== '') { try { if ($steamGameID === false || $this->_gameResults === false) { diff --git a/composer.json b/composer.json index bdc6f9196..dadaa6a86 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,6 @@ "dariusiii/rarinfo": "^2.7", "dariusiii/tmdb-laravel": "^12.0.2", "dariusiii/tv-maze-php-api": "^2.0.0", - "dborsatto/php-giantbomb": "^2.2", "divineomega/php-cli-progress-bar": "^2.1", "fakerphp/faker": "^1.23", "genealabs/laravel-caffeine": "^12.0", @@ -65,7 +64,7 @@ "intervention/image": "^3.11", "jrean/laravel-user-verification": "^13.0", "kevinlebrun/colors.php": "^1.0", - "laravel/framework": "^12.4", + "laravel/framework": "^12.28", "laravel/horizon": "^5.31", "laravel/pulse": "^1.4", "laravel/sanctum": "^4.0", diff --git a/composer.lock b/composer.lock index 0d68d2179..f4b543348 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ee41533387c7cf6236214d5ba2035c28", + "content-hash": "d77a84e92b7b3fdb22690dc0ede1c7f3", "packages": [ { "name": "aharen/omdbapi", @@ -333,266 +333,6 @@ ], "time": "2025-08-29T12:40:03+00:00" }, - { - "name": "cache/adapter-common", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/adapter-common.git", - "reference": "8788309be72aa7be69b88cdc0687549c74a7d479" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/adapter-common/zipball/8788309be72aa7be69b88cdc0687549c74a7d479", - "reference": "8788309be72aa7be69b88cdc0687549c74a7d479", - "shasum": "" - }, - "require": { - "cache/tag-interop": "^1.0", - "php": ">=7.4", - "psr/cache": "^1.0 || ^2.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "cache/integration-tests": "^0.17", - "phpunit/phpunit": "^7.5.20 || ^9.5.10" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\Adapter\\Common\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "Common classes for PSR-6 adapters", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr-6", - "tag" - ], - "support": { - "source": "https://github.com/php-cache/adapter-common/tree/1.3.0" - }, - "time": "2022-01-15T15:47:19+00:00" - }, - { - "name": "cache/hierarchical-cache", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/hierarchical-cache.git", - "reference": "dedffd0a74f72c1db76e57ce29885836944e27f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/hierarchical-cache/zipball/dedffd0a74f72c1db76e57ce29885836944e27f3", - "reference": "dedffd0a74f72c1db76e57ce29885836944e27f3", - "shasum": "" - }, - "require": { - "cache/adapter-common": "^1.0", - "php": ">=7.4", - "psr/cache": "^1.0 || ^2.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.5.20 || ^9.5.10" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\Hierarchy\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "A helper trait and interface to your PSR-6 cache to support hierarchical keys.", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "hierarchical", - "hierarchy", - "psr-6" - ], - "support": { - "source": "https://github.com/php-cache/hierarchical-cache/tree/1.2.0" - }, - "time": "2022-01-15T15:47:19+00:00" - }, - { - "name": "cache/tag-interop", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/tag-interop.git", - "reference": "b062b1d735357da50edf8387f7a8696f3027d328" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/tag-interop/zipball/b062b1d735357da50edf8387f7a8696f3027d328", - "reference": "b062b1d735357da50edf8387f7a8696f3027d328", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0 || ^8.0", - "psr/cache": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\TagInterop\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com", - "homepage": "https://github.com/nicolas-grekas" - } - ], - "description": "Framework interoperable interfaces for tags", - "homepage": "https://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr", - "psr6", - "tag" - ], - "support": { - "issues": "https://github.com/php-cache/tag-interop/issues", - "source": "https://github.com/php-cache/tag-interop/tree/1.1.0" - }, - "time": "2021-12-31T10:03:23+00:00" - }, - { - "name": "cache/void-adapter", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/void-adapter.git", - "reference": "1f10ea9b3ccfad8422c86d326a86efc8917e2ad9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/void-adapter/zipball/1f10ea9b3ccfad8422c86d326a86efc8917e2ad9", - "reference": "1f10ea9b3ccfad8422c86d326a86efc8917e2ad9", - "shasum": "" - }, - "require": { - "cache/adapter-common": "^1.0", - "cache/hierarchical-cache": "^1.0", - "php": ">=7.4", - "psr/cache": "^1.0 || ^2.0", - "psr/simple-cache": "^1.0" - }, - "provide": { - "psr/cache-implementation": "^1.0", - "psr/simple-cache-implementation": "^1.0" - }, - "require-dev": { - "cache/integration-tests": "^0.17", - "phpunit/phpunit": "^7.5.20 || ^9.5.10" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\Adapter\\Void\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "A PSR-6 cache implementation using Void. This implementation supports tags", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr-6", - "tag", - "void" - ], - "support": { - "source": "https://github.com/php-cache/void-adapter/tree/1.2.0" - }, - "time": "2022-01-15T15:47:19+00:00" - }, { "name": "canihavesomecoffee/thetvdbapi", "version": "2.1.11", @@ -1185,58 +925,6 @@ }, "time": "2025-09-16T12:23:56+00:00" }, - { - "name": "dborsatto/php-giantbomb", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/dborsatto/php-giantbomb.git", - "reference": "cc0a2a7c913669470510db02f036bf7599296340" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dborsatto/php-giantbomb/zipball/cc0a2a7c913669470510db02f036bf7599296340", - "reference": "cc0a2a7c913669470510db02f036bf7599296340", - "shasum": "" - }, - "require": { - "cache/void-adapter": "^1.0", - "ext-json": "*", - "ext-mbstring": "*", - "guzzlehttp/guzzle": "^6.2|^7.0", - "php": "^7.4|^8.0", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "cache/array-adapter": "^1.0", - "friendsofphp/php-cs-fixer": "^2.16", - "phpspec/phpspec": "^6.2", - "vimeo/psalm": "^3.15" - }, - "type": "library", - "autoload": { - "psr-4": { - "DBorsatto\\GiantBomb\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Davide Borsatto", - "email": "davide.borsatto@gmail.com", - "homepage": "https://github.com/dborsatto" - } - ], - "description": "A PHP library that acts as a wrapper for the GiantBomb API.", - "support": { - "issues": "https://github.com/dborsatto/php-giantbomb/issues", - "source": "https://github.com/dborsatto/php-giantbomb/tree/v2.2.0" - }, - "time": "2021-06-17T10:33:15+00:00" - }, { "name": "dflydev/dot-access-data", "version": "v3.0.3", @@ -8020,16 +7708,16 @@ }, { "name": "psr/cache", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b" + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/213f9dbc5b9bfbc4f8db86d2838dc968752ce13b", - "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { @@ -8063,9 +7751,9 @@ "psr-6" ], "support": { - "source": "https://github.com/php-fig/cache/tree/2.0.0" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "time": "2021-02-03T23:23:37+00:00" + "time": "2021-02-03T23:26:27+00:00" }, { "name": "psr/clock", @@ -10449,23 +10137,23 @@ }, { "name": "symfony/cache", - "version": "v7.2.9", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "e874746cea6893d4b91943eab8376a0fe7528de6" + "reference": "6621a2bee5373e3e972b2ae5dbedd5ac899d8cb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/e874746cea6893d4b91943eab8376a0fe7528de6", - "reference": "e874746cea6893d4b91943eab8376a0fe7528de6", + "url": "https://api.github.com/repos/symfony/cache/zipball/6621a2bee5373e3e972b2ae5dbedd5ac899d8cb6", + "reference": "6621a2bee5373e3e972b2ae5dbedd5ac899d8cb6", "shasum": "" }, "require": { "php": ">=8.2", "psr/cache": "^2.0|^3.0", "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^2.5|^3", + "symfony/cache-contracts": "^3.6", "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/service-contracts": "^2.5|^3", "symfony/var-exporter": "^6.4|^7.0" @@ -10527,7 +10215,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v7.2.9" + "source": "https://github.com/symfony/cache/tree/v7.3.2" }, "funding": [ { @@ -10547,28 +10235,25 @@ "type": "tidelift" } ], - "time": "2025-07-30T17:03:27+00:00" + "time": "2025-07-30T17:13:41+00:00" }, { "name": "symfony/cache-contracts", - "version": "v2.5.4", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "517c3a3619dadfa6952c4651767fcadffb4df65e" + "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/517c3a3619dadfa6952c4651767fcadffb4df65e", - "reference": "517c3a3619dadfa6952c4651767fcadffb4df65e", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/5d68a57d66910405e5c0b63d6f0af941e66fc868", + "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "suggest": { - "symfony/cache-implementation": "" + "php": ">=8.1", + "psr/cache": "^3.0" }, "type": "library", "extra": { @@ -10577,7 +10262,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -10610,7 +10295,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v2.5.4" + "source": "https://github.com/symfony/cache-contracts/tree/v3.6.0" }, "funding": [ { @@ -10626,7 +10311,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2025-03-13T15:25:07+00:00" }, { "name": "symfony/clock", diff --git a/config/nntmux_api.php b/config/nntmux_api.php index 13429c1f3..f082d0721 100644 --- a/config/nntmux_api.php +++ b/config/nntmux_api.php @@ -2,7 +2,6 @@ return [ 'anidb_api_key' => env('ANIDB_APIKEY', ''), - 'giantbomb_api_key' => env('GIANTBOMB_APIKEY', ''), 'fanarttv_api_key' => env('FANARTTV_APIKEY', ''), 'omdb_api_key' => env('OMDB_APIKEY', ''), 'trakttv_api_key' => env('TRAKTTV_APIKEY', ''), diff --git a/resources/views/themes/Gentele/games.tpl b/resources/views/themes/Gentele/games.tpl index 12f6fe1f4..7de593035 100755 --- a/resources/views/themes/Gentele/games.tpl +++ b/resources/views/themes/Gentele/games.tpl @@ -82,13 +82,6 @@