Commit 03844561 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 03d04025
...@@ -177,7 +177,7 @@ class Media { ...@@ -177,7 +177,7 @@ class Media {
} }
}else if($action == "check"){ }else if($action == "check"){
if( $this->updateMovie($array, (strlen($value[0])>0?$value[0].'/':'').$value[1], false, true)){ //TODO auf true für md5!!! if( $this->updateMovie($array, (strlen($value[0])>0?$value[0].'/':'').$value[1], true, true)){
echo "Film wurde geprüft".PHP_EOL; echo "Film wurde geprüft".PHP_EOL;
} }
...@@ -455,8 +455,10 @@ class Media { ...@@ -455,8 +455,10 @@ class Media {
//TODO hier weiter!! //TODO hier weiter!!
// werte von MediaInfo holen... // werte von MediaInfo holen...
echo " Hole Daten von mediainfo... "; echo " Hole Daten von mediainfo... ";
$befehl = 'mediainfo --Output=XML "'.$Pfad.$FilenameOrg.'" > /tmp/'.$array["imdbID"].'.xml'; if(!file_exists('/tmp/'.$array["imdbID"].'.xml')){
exec($befehl); $befehl = 'mediainfo --Output=XML "'.$Pfad.$FilenameOrg.'" > /tmp/'.$array["imdbID"].'.xml';
exec($befehl);
}
$xmlstring = file_get_contents('/tmp/'.$array["imdbID"].'.xml'); $xmlstring = file_get_contents('/tmp/'.$array["imdbID"].'.xml');
$xml = simplexml_load_string($xmlstring); $xml = simplexml_load_string($xmlstring);
$json = json_encode($xml,JSON_PRETTY_PRINT); $json = json_encode($xml,JSON_PRETTY_PRINT);
......
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