Commit 1196aa57 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 1ee7c373
...@@ -291,7 +291,7 @@ class Media { ...@@ -291,7 +291,7 @@ class Media {
//echo " fail2!".PHP_EOL; //echo " fail2!".PHP_EOL;
echo $this->Console->error("keine summary gefunden für imdbID ".$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=".$this->config["ApiKeys"]['Tmdb_Key']."&language=de&append_to_response=trailers";
$tmdbData1 = $this->jsonCacheDecoder($tmdbURL); $tmdbData1 = $this->jsonCacheDecoder($tmdbURL);
if(isset($tmdbData1["trailers"]["youtube"][0]["source"])){ if(isset($tmdbData1["trailers"]["youtube"][0]["source"])){
//TODO youtube Key auf 11 Zeichen prüfen!! //TODO youtube Key auf 11 Zeichen prüfen!!
...@@ -303,7 +303,7 @@ class Media { ...@@ -303,7 +303,7 @@ class Media {
} }
}else{ }else{
$tmdbURL2="https://api.themoviedb.org/3/movie/".$tmdb["movie_results"][0]["id"]."?api_key=".$tmdbKey."&language=en&append_to_response=trailers"; $tmdbURL2="https://api.themoviedb.org/3/movie/".$tmdb["movie_results"][0]["id"]."?api_key=".$this->config["ApiKeys"]['Tmdb_Key']."&language=en&append_to_response=trailers";
$tmdbData2 = $this->jsonCacheDecoder($tmdbURL2); $tmdbData2 = $this->jsonCacheDecoder($tmdbURL2);
if(isset($tmdbData2["trailers"]["youtube"][0]["source"])){ if(isset($tmdbData2["trailers"]["youtube"][0]["source"])){
$youtubeEN = str_replace("&hd=1", "", $tmdbData1["trailers"]["youtube"][0]["source"]); $youtubeEN = str_replace("&hd=1", "", $tmdbData1["trailers"]["youtube"][0]["source"]);
...@@ -314,7 +314,7 @@ class Media { ...@@ -314,7 +314,7 @@ class Media {
} }
} }
else{ else{
echo $this->Console->error("kein Trailer gefunden für imdbID ".$Film["imdbID"]."!").PHP_EOL; echo $this->Console->error("kein Trailer gefunden für imdbID ".$imdbID."!").PHP_EOL;
} }
} }
}else{ }else{
......
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