Commit acebf9e3 authored by Nico Schallehn's avatar Nico Schallehn

test

parent c77c7127
...@@ -105,50 +105,42 @@ class Media { ...@@ -105,50 +105,42 @@ class Media {
else { echo " Verzeichnis ".$this->PfadzumAusgeben.$value." wird für ".$key." als Ausgabe verwendet".PHP_EOL; } else { echo " Verzeichnis ".$this->PfadzumAusgeben.$value." wird für ".$key." als Ausgabe verwendet".PHP_EOL; }
} }
} }
echo PHP_EOL;
echo "Starte verarbeitung der Filme:".PHP_EOL.PHP_EOL; echo "Starte verarbeitung der Filme:".PHP_EOL.PHP_EOL;
$FilmeArr = $this->dirtoArray($this->PfadzumEinlesen); $FilmeArr = $this->dirtoArray($this->PfadzumEinlesen);
//var_dump($FilmeArr); //var_dump($FilmeArr);
foreach ($FilmeArr as $value) { foreach ($FilmeArr as $value) {
echo " ".$this->PfadzumEinlesen.'/'.(strlen($value[0])>0?$value[0].'/':'').$value[1].PHP_EOL; 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;
} }
trim(fgets(STDIN)); trim(fgets(STDIN));
echo PHP_EOL; echo PHP_EOL;
//return ; //return ;
} }
private function parseMovie($Pfad, $Filename){
$array = array();
return $Pfad." > ".$Filename;
}
private function dirtoArray($dir, $root = ''){ private function dirtoArray($dir, $root = ''){
$Arr = scandir($dir); $Arr = scandir($dir);
//global $Notindexed; foreach ($this->config["FolderIgnor"] AS $value){
//$FolderIgnor = array('.@__thumb', '@Recycle', 'HD-Serien', 'Die Olsenbande', 'Serien', 'FilmeALT', 'Filme','FilmeZumEinlesen'); unset($Arr[array_search($value, $Arr)]);
foreach ($this->config["FolderIgnor"] AS $value){
unset($Arr[array_search($value, $Arr)]);
}/*
unset($Arr[array_search('.', $Arr)]);
unset($Arr[array_search('..', $Arr)]);
unset($Arr[array_search('.@__thumb', $Arr)]);
unset($Arr[array_search('/HD-Serien', $Arr)]);
unset($Arr[array_search('/Serien', $Arr)]);
unset($Arr[array_search('/FilmeALT', $Arr)]);
unset($Arr[array_search('/FilmeALT', $Arr)]);
unset($Arr[array_search('/Filme', $Arr)]);
unset($Arr[array_search('/FilmeZumEinlesen', $Arr)]);
*/
foreach ( $Arr AS $Key => $Value){
if(is_dir ($dir.'/'.$Value) AND !in_array($Value, $FolderIgnor)){
$SubDir = dirtoArray($dir.'/'.$Value, $root.'/'.$Value);
//print_r($SubDir);
//$OutArray[] = $dir.'/'.$Value;
//$OutArray = array_merge($OutArray, $SubDir);
} }
else{ foreach ( $Arr AS $Key => $Value){
$this->FolderArray[] = array($root, $Value); if(is_dir ($dir.'/'.$Value) AND !in_array($Value, $FolderIgnor)){
//echo $root.'/'.$Value.PHP_EOL; $SubDir = dirtoArray($dir.'/'.$Value, $root.'/'.$Value);
}
else{
$this->FolderArray[] = array($root, $Value);
}
} }
return $this->FolderArray;
} }
return $this->FolderArray;
}
} }
\ No newline at end of file
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