Commit 7116478c authored by Nico Schallehn's avatar Nico Schallehn

test

parent 3430fb8a
...@@ -285,16 +285,16 @@ class Media { ...@@ -285,16 +285,16 @@ class Media {
* @param * @param
*/private function gibTMDBdata($imdbID, &$DataArray){ */private function gibTMDBdata($imdbID, &$DataArray){
echo " Hole Daten von themoviedb.org... "; echo " Hole Daten von themoviedb.org... ";
$tmdbKey = "b1ddcc7d16281ce09f692896f882ba9d"; //$tmdbKey = "b1ddcc7d16281ce09f692896f882ba9d";
echo "API KEY TMDB: ".$this->config['API_Keys']['Tmdb_Key']."<>".$tmdbKey."\n\n\n"; //echo "API KEY TMDB: ".$this->config["ApiKeys"]['Tmdb_Key']."<>".$tmdbKey."\n\n\n";
$tmdb = $this->jsonCacheDecoder("https://api.themoviedb.org/3/find/tt".$Film["imdbID"]."?external_source=imdb_id&api_key=".$tmdbKey."&language=de"); $tmdb = $this->jsonCacheDecoder("https://api.themoviedb.org/3/find/tt".$imdbID."?external_source=imdb_id&api_key=".$this->config["ApiKeys"]['Tmdb_Key']."&language=de");
if(isset($tmdb["movie_results"])){ if(isset($tmdb["movie_results"])){
if(isset($tmdb["movie_results"][0]["overview"])){ if(isset($tmdb["movie_results"][0]["overview"])){
echo " done!".PHP_EOL; echo " done!".PHP_EOL;
$DataArray["summary"]=$tmdb["movie_results"][0]["overview"]; $DataArray["summary"]=$tmdb["movie_results"][0]["overview"];
}else{ }else{
echo " fail2!".PHP_EOL; //echo " fail2!".PHP_EOL;
$fehler .= $this->Console->error("keine summary gefunden für imdbID ".$Film["imdbID"]."!").PHP_EOL; echo $this->Console->error("keine summary gefunden für imdbID ".$imdbID."!").PHP_EOL;
} }
$tmdbURL="https://api.themoviedb.org/3/movie/".$tmdb["movie_results"][0]["id"]."?api_key=".$tmdbKey."&language=de&append_to_response=trailers"; $tmdbURL="https://api.themoviedb.org/3/movie/".$tmdb["movie_results"][0]["id"]."?api_key=".$tmdbKey."&language=de&append_to_response=trailers";
$tmdbData1 = $this->jsonCacheDecoder($tmdbURL); $tmdbData1 = $this->jsonCacheDecoder($tmdbURL);
......
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