Commit 5114c866 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 20cc0e21
......@@ -186,6 +186,7 @@ class Media {
$array["Schauspieler"] = $imdb->getCastAsOwn(0, false);
} else{
echo $this->Console->error("imdbID nicht bei imdb gefunden!").PHP_EOL;
file_put_contents("./phpTestout/".$array["imdbID"].".txt", "Keine Infos auf imdbID gefunden: ".$Pfad.$FilenameOrg.PHP_EOL, FILE_APPEND);
return false;
}
echo " done!".PHP_EOL;
......@@ -220,6 +221,7 @@ class Media {
$array["channelsger"] = substr($array["channelsger"],strripos( $array["channelsger"],"/")+1);
if(!is_numeric($array["channelsger"])){
echo $this->Console->error("channelsger ist nicht Numerisch!").PHP_EOL;
file_put_contents("./phpTestout/".$array["imdbID"].".txt", "channelsger ist nicht Numerisch!".PHP_EOL, FILE_APPEND);
return false;
}
}
......@@ -232,6 +234,7 @@ class Media {
$array["channelseng"] = substr($array["channelseng"],strripos( $array["channelseng"],"/")+1);
if(!is_numeric($array["channelseng"])){
echo $this->Console->error("channelseng ist nicht Numerisch!").PHP_EOL;
file_put_contents("./phpTestout/".$array["imdbID"].".txt", "channelseng ist nicht Numerisch!".PHP_EOL, FILE_APPEND);
return false;
}
}
......@@ -257,16 +260,17 @@ class Media {
file_put_contents("./phpTestout/".$array['imdbID'].".txt", $copy.PHP_EOL, FILE_APPEND);
echo $copy."done!".PHP_EOL;
}
shell_exec("mv './phpTestout/".$array["imdbID"].".txt' './phpTestout/OK_".$array["imdbID"].".txt'");
return true;
}
else{
echo $this->Console->error("Fehler beim Eintragen in die DB!").PHP_EOL;
file_put_contents("./phpTestout/".$array["imdbID"].".txt", "Fehler beim Eintragen in die DB".PHP_EOL, FILE_APPEND);
return false;
}
/*foreach ($array as $key => $value) {
echo " ".$key." => '".$value."'".PHP_EOL;
}*/
}else{
echo $this->Console->error("Datei Existiert nicht!").PHP_EOL;
file_put_contents("./phpTestout/default.txt", "Datei existiert nicht: ".$Pfad.$Filename.PHP_EOL, FILE_APPEND);
return false;
}
}
......@@ -282,8 +286,8 @@ class Media {
}
// Jetzt noch MD5 berechnen
echo "Berechne MD5... ";
//$array["md5"] = md5_file($Pfad.$FilenameOrg); //TODO Einkommentieren für md5
$DataArr["md5"] = substr(shell_exec('md5sum -b "'.$File.'"'),0,32);
$DataArr["md5"] = md5_file($Pfad.$FilenameOrg); //TODO Einkommentieren für md5
//$DataArr["md5"] = substr(shell_exec('md5sum -b "'.$File.'"'),0,32);
file_put_contents("./phpTestout/".$DataArr['imdbID'].".txt", "md5 = ".$DataArr["md5"].PHP_EOL, FILE_APPEND);
//$array["md5"] = substr(shell_exec('md5sum -b "'."/tmp/".$DataArr["imdbID"].".xml".'"'),0,32);
echo " done!".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