mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 00:01:21 +00:00
Move all third party api keys from database to .env file
This commit is contained in:
+6
-1
@@ -139,10 +139,15 @@ SMARTY_CACHE_DRIVER=file
|
||||
FIREWALL_ENABLED=false
|
||||
|
||||
IGDB_KEY=
|
||||
TMDB_APIKEY=
|
||||
TMDB_APIKEY=9a4e16adddcd1e86da19bcaf5ff3c2a3
|
||||
TMDB_CACHE=false
|
||||
TMDB_LOG=false
|
||||
TVDB_APIKEY=
|
||||
GIANTBOMB_APIKEY=
|
||||
ANIDB_APIKEY=
|
||||
FANARTTV_APIKEY=
|
||||
OMDB_APIKEY=
|
||||
TRAKTTV_APIKEY=
|
||||
|
||||
TEMP_UNRAR_PATH=
|
||||
TEMP_UNZIP_PATH=
|
||||
|
||||
@@ -126,7 +126,7 @@ class Games
|
||||
|
||||
$this->colorCli = new ColorCLI();
|
||||
|
||||
$this->publicKey = Settings::settingValue('APIs..giantbombkey');
|
||||
$this->publicKey = config('nntmux_api.giantbomb_api_key');
|
||||
$this->gameQty = Settings::settingValue('..maxgamesprocessed') !== '' ? (int) Settings::settingValue('..maxgamesprocessed') : 150;
|
||||
$this->imgSavePath = NN_COVERS.'games'.DS;
|
||||
$this->renamed = (int) Settings::settingValue('..lookupgames') === 2 ? 'AND isrenamed = 1' : '';
|
||||
|
||||
@@ -167,16 +167,16 @@ class Movie
|
||||
|
||||
$this->releaseImage = ($options['ReleaseImage'] instanceof ReleaseImage ? $options['ReleaseImage'] : new ReleaseImage());
|
||||
$this->colorCli = new ColorCLI();
|
||||
$this->traktcheck = Settings::settingValue('APIs..trakttvclientkey');
|
||||
$this->traktcheck = config('nntmux_api.trakttv_api_key');
|
||||
if ($this->traktcheck !== null) {
|
||||
$this->traktTv = new TraktTv(['Settings' => null]);
|
||||
}
|
||||
$this->client = new Client();
|
||||
$this->fanartapikey = Settings::settingValue('APIs..fanarttvkey');
|
||||
$this->fanartapikey = config('nntmux_api.fanarttv_api_key');
|
||||
if ($this->fanartapikey !== null) {
|
||||
$this->fanart = new FanartTV($this->fanartapikey);
|
||||
}
|
||||
$this->omdbapikey = Settings::settingValue('APIs..omdbkey');
|
||||
$this->omdbapikey = config('nntmux_api.omdb_api_key');
|
||||
if ($this->omdbapikey !== null) {
|
||||
$this->omdbApi = new OMDbAPI($this->omdbapikey);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class AniDB
|
||||
$lastupdated = Settings::settingValue('APIs.AniDB.last_full_update');
|
||||
|
||||
$this->imgSavePath = NN_COVERS.'anime'.DS;
|
||||
$this->apiKey = Settings::settingValue('APIs..anidbkey');
|
||||
$this->apiKey = config('nntmux_api.anidb_api_key');
|
||||
|
||||
$this->updateInterval = $anidbupdint ?? '7';
|
||||
$this->lastUpdate = $lastupdated ?? '0';
|
||||
|
||||
@@ -54,7 +54,7 @@ class TraktTv extends TV
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
parent::__construct($options);
|
||||
$clientId = Settings::settingValue('APIs..trakttvclientkey');
|
||||
$clientId = config('nntmux_api.trakttv_api_key');
|
||||
$requestHeaders = [
|
||||
'Content-Type' => 'application/json',
|
||||
'trakt-api-version' => 2,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
2020-03-01 DariusIII
|
||||
* Chg: Move all third party api keys from database to .env file
|
||||
2020-02-27 DariusIII
|
||||
* Chg: Add option to disable or enable elasticsearch logging
|
||||
2020-01-27 DariusIII
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
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', ''),
|
||||
];
|
||||
@@ -801,62 +801,6 @@ return [
|
||||
'hint' => 'The minimum total size in bytes to make a release. If set to 0, then ignored. Only deletes during release creation.',
|
||||
'setting' => 'minsizetoformrelease',
|
||||
],
|
||||
105 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'anidbkey',
|
||||
'value' => '',
|
||||
'hint' => 'The Anidb api key. Used for Anime lookups.',
|
||||
'setting' => 'anidbkey',
|
||||
],
|
||||
106 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'fanarttvkey',
|
||||
'value' => '',
|
||||
'hint' => 'The Fanart.tv api key. Used for Fanart.tv lookups. Fanart.tv would appreciate it if you use this service to help them out by adding high quality images not already available on TMDB.',
|
||||
'setting' => 'fanarttvkey',
|
||||
],
|
||||
107 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'giantbombkey',
|
||||
'value' => '',
|
||||
'hint' => 'The giantbomb api key. Used for game lookups.',
|
||||
'setting' => 'giantbombkey',
|
||||
],
|
||||
108 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'omdbkey',
|
||||
'value' => '',
|
||||
'hint' => 'OmdbAPIkey obtained from Omdb.Used for Omdb API lookups',
|
||||
'setting' => 'omdbkey',
|
||||
],
|
||||
109 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'rottentomatokey',
|
||||
'value' => 'qxbxyngtujprvw7jxam2m6na',
|
||||
'hint' => 'The api key used for access to rotten tomatoes.',
|
||||
'setting' => 'rottentomatokey',
|
||||
],
|
||||
110 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'tmdbkey',
|
||||
'value' => '9a4e16adddcd1e86da19bcaf5ff3c2a3',
|
||||
'hint' => 'The API key used for access to TMDb.',
|
||||
'setting' => 'tmdbkey',
|
||||
],
|
||||
111 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'trakttvclientkey',
|
||||
'value' => '',
|
||||
'hint' => 'The Trakt.tv API v2 Client ID (SHA256 hash - 64 characters long string). Used for movie and tv lookups.',
|
||||
'setting' => 'trakttvclientkey',
|
||||
],
|
||||
112 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => 'AniDB',
|
||||
|
||||
@@ -798,54 +798,6 @@ class SettingsTableSeeder extends Seeder
|
||||
'hint' => 'The minimum total size in bytes to make a release. If set to 0, then ignored. Only deletes during release creation.',
|
||||
'setting' => 'minsizetoformrelease',
|
||||
],
|
||||
105 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'anidbkey',
|
||||
'value' => '',
|
||||
'hint' => 'The Anidb api key. Used for Anime lookups.',
|
||||
'setting' => 'anidbkey',
|
||||
],
|
||||
106 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'fanarttvkey',
|
||||
'value' => '',
|
||||
'hint' => 'The Fanart.tv api key. Used for Fanart.tv lookups. Fanart.tv would appreciate it if you use this service to help them out by adding high quality images not already available on TMDB.',
|
||||
'setting' => 'fanarttvkey',
|
||||
],
|
||||
107 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'giantbombkey',
|
||||
'value' => '',
|
||||
'hint' => 'The giantbomb api key. Used for game lookups.',
|
||||
'setting' => 'giantbombkey',
|
||||
],
|
||||
108 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'omdbkey',
|
||||
'value' => '',
|
||||
'hint' => 'OmdbAPIkey obtained from Omdb.Used for Omdb API lookups',
|
||||
'setting' => 'omdbkey',
|
||||
],
|
||||
109 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'rottentomatokey',
|
||||
'value' => 'qxbxyngtujprvw7jxam2m6na',
|
||||
'hint' => 'The api key used for access to rotten tomatoes.',
|
||||
'setting' => 'rottentomatokey',
|
||||
],
|
||||
111 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => '',
|
||||
'name' => 'trakttvclientkey',
|
||||
'value' => '',
|
||||
'hint' => 'The Trakt.tv API v2 Client ID (SHA256 hash - 64 characters long string). Used for movie and tv lookups.',
|
||||
'setting' => 'trakttvclientkey',
|
||||
],
|
||||
112 => [
|
||||
'section' => 'APIs',
|
||||
'subsection' => 'AniDB',
|
||||
|
||||
@@ -6,7 +6,7 @@ use App\Models\Settings;
|
||||
use Blacklight\ColorCLI;
|
||||
use Blacklight\libraries\FanartTV;
|
||||
|
||||
$fanart = new FanartTV(Settings::settingValue('APIs..fanarttvkey'));
|
||||
$fanart = new FanartTV(config('nntmux_api.fanarttv_api_key'));
|
||||
$colorCli = new ColorCLI();
|
||||
|
||||
if (! empty($argv[1])) {
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>3<sup>rd</sup> Party API Keys</legend>
|
||||
<legend>3<sup>rd</sup> Party API Keys (will be removed, all values should be in .env)</legend>
|
||||
<table class="input data table table-striped responsive-utilities jambo-table">
|
||||
<tr>
|
||||
<td style="width:180px;"><label for="trakttvclientkey">Trakt.tv API Client ID:</label></td>
|
||||
|
||||
Reference in New Issue
Block a user