Commit 42932961 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 246fc82d
......@@ -240,6 +240,21 @@ class Media {
echo " fail2!".PHP_EOL;
var_dump($tmdb["movie_results"][0]);
}
$url2="https://api.themoviedb.org/3/movie/".$tmdb["movie_results"][0]["id"]."?api_key=".$tmdbKey."&language=de&append_to_response=trailers";
$tmdb2 = json_decode(file_get_contents($url2), true);
if(isset($tmdb2["trailers"]["youtube"][0]["source"])){
$newData["youtube"]= "DE:".$tmdb2["trailers"]["youtube"][0]["source"];
}else{
$url2="https://api.themoviedb.org/3/movie/".$tmdb["movie_results"][0]["id"]."?api_key=".$tmdbKey."&language=en&append_to_response=trailers";
$tmdb2 = json_decode(file_get_contents($url2), true);
if(isset($tmdb2["trailers"]["youtube"][0]["source"])){
$newData["youtube"]= "EN:".$tmdb2["trailers"]["youtube"][0]["source"];
}
}
}else{
echo " fail1!".PHP_EOL;
......@@ -255,7 +270,7 @@ class Media {
$changed .= $key.", ";
}
}
$fehlerglobal = $fehler;
$fehlerglobal .= $fehler;
echo $fehler;
if(!$first){
$SQL = "UPDATE Filme SET".$update." WHERE imdbID = '".$Film["imdbID"]."';";
......
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