Commit 7c6bc803 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 81d44f30
...@@ -347,10 +347,10 @@ class Media { ...@@ -347,10 +347,10 @@ class Media {
private function gibMediaInfo($Datei, &$DataArray){ private function gibMediaInfo($Datei, &$DataArray){
$array["size"] = $this->getfileSize($Datei); $array["size"] = $this->getfileSize($Datei);
if(!file_exists('/tmp/'.$array["imdbID"].(!$array["3d"]==""?"3d":"").'.xml')){ if(!file_exists('/tmp/'.$array["imdbID"].(!$array["3d"]==""?"3d":"").'.xml')){
$befehl = 'mediainfo --Output=XML "'.$Datei.'" > /tmp/'.$array["imdbID"].(!$array["3d"]==""?"3d":"").(isset($array["Season"])?"S".$array["Season"]."E".$array["Episode"]:"").'.xml'; $befehl = 'mediainfo --Output=XML "'.$Datei.'" > /tmp/'.$array["imdbID"].(isset($array["Season"])?"S".$array["Season"]."E".$array["Episode"]:(!$array["3d"]==""?"3d":"")).'.xml';
exec($befehl); exec($befehl);
} }
$xmlstring = file_get_contents('/tmp/'.$array["imdbID"].(!$array["3d"]==""?"3d":"").(isset($array["Season"])?"S".$array["Season"]."E".$array["Episode"]:"").'.xml'); //TODO Testen ob 3d Geht.... $xmlstring = file_get_contents('/tmp/'.$array["imdbID"].(isset($array["Season"])?"S".$array["Season"]."E".$array["Episode"]:(!$array["3d"]==""?"3d":"")).'.xml'); //TODO Testen ob 3d Geht....
$xml = simplexml_load_string($xmlstring); $xml = simplexml_load_string($xmlstring);
$json = json_encode($xml,JSON_PRETTY_PRINT); $json = json_encode($xml,JSON_PRETTY_PRINT);
$array2 = json_decode($json,TRUE); $array2 = json_decode($json,TRUE);
......
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