Commit 38419d8c authored by Nico Schallehn's avatar Nico Schallehn

vorbereitung für Api-Keys aus Konfig datei

parent 1838a90d
...@@ -29,6 +29,8 @@ class Media { ...@@ -29,6 +29,8 @@ class Media {
"DB_Username" => "MediaDB", "DB_Username" => "MediaDB",
"DB_Passwort" => "MediaDB", "DB_Passwort" => "MediaDB",
"DB_Server" => "192.168.0.32", "DB_Server" => "192.168.0.32",
"ApiKeys" => array( "Fanart_Key" =>"9902c9197f457401ff7a7eba839213ba",
"Tmdb_Key" =>"b1ddcc7d16281ce09f692896f882ba9d"),
"FolderIgnor" => array('.', '..', '.@__thumb', '@Recycle'), "FolderIgnor" => array('.', '..', '.@__thumb', '@Recycle'),
"HDD" => array(1 => array("HDDdir" => "/media/QNAP/", "HDD" => array(1 => array("HDDdir" => "/media/QNAP/",
"Filme" => "Filme/", "Filme" => "Filme/",
...@@ -222,6 +224,7 @@ class Media { ...@@ -222,6 +224,7 @@ class Media {
} }
echo " Hole Daten von themoviedb.org... "; echo " Hole Daten von themoviedb.org... ";
$tmdbKey = "b1ddcc7d16281ce09f692896f882ba9d"; $tmdbKey = "b1ddcc7d16281ce09f692896f882ba9d";
//$this->config['API_Keys']['Tmdb_Key']
$tmdb = json_decode(file_get_contents("https://api.themoviedb.org/3/find/tt".$Film["imdbID"]."?external_source=imdb_id&api_key=".$tmdbKey."&language=de"), true); $tmdb = json_decode(file_get_contents("https://api.themoviedb.org/3/find/tt".$Film["imdbID"]."?external_source=imdb_id&api_key=".$tmdbKey."&language=de"), true);
if(isset($tmdb["movie_results"])){ if(isset($tmdb["movie_results"])){
if(isset($tmdb["movie_results"][0]["overview"])){ if(isset($tmdb["movie_results"][0]["overview"])){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment