Commit ab872935 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 4e286044
......@@ -102,7 +102,7 @@ class Media {
echo "Starte verarbeitung der Filme:".PHP_EOL.PHP_EOL;
$FilmeArr = $this->dirtoArray($this->PfadzumEinlesen);
var_dump($FilmeArr);
//var_dump($FilmeArr);
foreach ($FilmeArr as $value) {
//echo " ".$this->PfadzumEinlesen.'/'.(strlen($value[0])>0?$value[0].'/':'').$value[1].PHP_EOL;
echo $this->parseMovie($this->PfadzumEinlesen.'/'.(strlen($value[0])>0?$value[0].'/':''), $value[1]).PHP_EOL;
......@@ -110,7 +110,7 @@ class Media {
$laufzeit = $end - $start;
echo "Laufzeit: ".$laufzeit." Sekunden!".PHP_EOL.PHP_EOL;
}
echo $this->Console->getColoredString("Alle Filme Verarbeitet!", "green", "light_gray") .PHP_EOL;
echo $this->Console->getColoredString("Alle Filme Verarbeitet!", "green", "light_gray") .PHP_EOL.PHP_EOL;
//trim(fgets(STDIN));
//echo PHP_EOL;
......@@ -142,11 +142,7 @@ class Media {
}
$array["imdbID"] = substr($Filename,strripos( $Filename,"(")+1,7);
$array["name"] = trim(substr($Filename, 0, strripos( $Filename,"(")));
/**/$array["Endung"] = trim(substr($Filename,strripos( $Filename,".")+1));
/*$array["Endung"] = trim(substr($Filename,strripos( $Filename,".")+1));*/
// Werte aus IMdb Auslesen...
$imdb = new IMDB("http://www.imdb.com/title/tt".$array["imdbID"]."/");
if ($imdb->isReady) {
......@@ -160,25 +156,12 @@ class Media {
echo "nichts gefunden!".PHP_EOL;
}
// werte von MediaInfo holen...
/*$mediainfo = new mediaInfo($Pfad.$FilenameOrg);
$array["width"] = $mediainfo->get_width();
$array["height"] = $mediainfo->get_height();
$array["Duration"] = $mediainfo->get_video_property("Duration");
$array["Duration"] = $mediainfo->get_video_property("Duration");
*/
$p = xml_parser_create();
$befehl = 'mediainfo --Output=XML "'.$Pfad.$FilenameOrg.'" > /tmp/'.$array["imdbID"].'.xml';
exec($befehl);
//echo $befehl;
$xmlstring = file_get_contents('/tmp/'.$array["imdbID"].'.xml');
/*echo $xml;
xml_parse_into_struct($p, $xml, $vals, $index);
xml_parser_free($p);*/
$xml = simplexml_load_string($xmlstring);
$json = json_encode($xml,JSON_PRETTY_PRINT);
//echo $json;
$array2 = json_decode($json,TRUE);
$array2 = simplexml_load_string($xmlstring);
//$json = json_encode($xml,JSON_PRETTY_PRINT);
//$array2 = json_decode($json,TRUE);
foreach ($array2["File"]["track"] as $key => $value) {
//echo " ".$key." ".$value["@attributes"]["type"].PHP_EOL;
switch ($value["@attributes"]["type"]) {
......
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