Commit 119ec5a1 authored by Nico Schallehn's avatar Nico Schallehn

tst

parent c1eab96a
......@@ -167,8 +167,10 @@ class Media {
//var_dump($imdb->getAll());
$array["year"] = $imdb->getYear();
$array["size"] = $this->getfileSize($Pfad.$FilenameOrg);
/*echo "Berechne MD5...";
$array["md5"] = md5_file($Pfad.$FilenameOrg); //TODO Einkommentieren für md5
//$array["md5"] = md5_file("/tmp/".$array["imdbID"].".xml");
echo "done!".PHP_EOL;*/
$array["md5"] = md5_file("/tmp/".$array["imdbID"].".xml");
$array["rating"] = $imdb->getRating();
$array["Genre"] = $imdb->getGenre();
$array["Schauspieler"] = $imdb->getCastAsOwn(0, false);
......@@ -269,14 +271,13 @@ class Media {
}else{
$keys[] = $key;
$values[] = "'".$value."'";
//echo " ".$key." => '".$value."'".PHP_EOL;
echo " ".$key." => '".$value."'".PHP_EOL;
}
}
$Query = "INSERT INTO Filme (".implode(",", $keys).") VALUES (".implode(",", $values).")";
echo $this->Console->getColoredString("Query", "light_gray", "green")." ".$Query.PHP_EOL;
sleep(3000);
echo "Lege Schauspieler und Genre Verküpfungen an:".PHP_EOL;
foreach ($Querys as $Query) {
echo $this->Console->getColoredString("Query", "light_gray", "green")." ".$Query.PHP_EOL;
}
......
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