Commit 5dd3eeff authored by Nico Schallehn's avatar Nico Schallehn

cover von Full neugenerieren wenn low fehlt

parent e3bcdbab
......@@ -156,18 +156,6 @@ class Media {
else{
if(isset($array["collection"])){
echo "Collection Ausgabe in eigenen Collection Ordner: ".$array["collection"].PHP_EOL;
/*
$array["collection"] = str_replace("Filmreihe", "", $array["collection"]);
$array["collection"] = str_replace(":", "", $array["collection"]);
$array["collection"] = str_replace("Reihe", "", $array["collection"]);
$array["collection"] = str_replace("/", "", $array["collection"]);
$array["collection"] = str_replace("Immer Ärger mit 40", "", $array["collection"]);
$array["collection"] = str_replace("Immer Ärger mit 40", "", $array["collection"]);
$array["collection"] = str_replace("()", "o", $array["collection"]);
$array["collection"] = str_replace("(Animiert)", "", $array["collection"]);
$array["collection"] = str_replace("Collection", "", $array["collection"]);
*/
$Pfadnew = trim($array["collection"]).'/';
}
else{
......@@ -261,6 +249,9 @@ class Media {
echo "Not Found!".PHP_EOL;
}
}
public function serien($action = "einlesen"){
echo "Not Found!".PHP_EOL;
}
/**
* @param imdbID
* @param DataArray
......@@ -1066,15 +1057,18 @@ class Media {
shell_exec("wget ".$url." -O ".$this->config["CoverDir"]."Serien/full/".$Film["series_nr"].".jpg > /dev/null 2>&1"); //");//
if(filesize($this->config["CoverDir"]."Serien/full/".$Film["series_nr"].".jpg")>0){
echo "done".PHP_EOL;
shell_exec("convert ".$this->config["CoverDir"]."Serien/full/".$Film["series_nr"].".jpg".
" -bordercolor White -border 1 -fuzz 50%% -trim -bordercolor White +repage -resize 5000x150\> ".
$this->config["CoverDir"]."Serien/low/".$Film["series_nr"].".jpg");
}else{
shell_exec("rm ".$this->config["CoverDir"]."Serien/full/".$Film["series_nr"].".jpg");
echo "fail".PHP_EOL;
$counterNotFound++;
}
}else{ echo "Cover für series_nr: ".$Film["series_nr"]." existiert bereits!".PHP_EOL;}
if(file_exists($this->config["CoverDir"]."Serien/full/".$Film["series_nr"].".jpg") AND !file_exists($this->config["CoverDir"]."Serien/low/".$Film["series_nr"].".jpg")){
shell_exec("convert ".$this->config["CoverDir"]."Serien/full/".$Film["series_nr"].".jpg".
" -bordercolor White -border 1 -fuzz 50%% -trim -bordercolor White +repage -resize 5000x150\> ".
$this->config["CoverDir"]."Serien/low/".$Film["series_nr"].".jpg");
}
$Query = "SELECT season_nr FROM Staffeln WHERE series_nr = ".$Film["series_nr"]." GROUP BY season_nr;";
$result2 = $mysqli->query($Query);
......@@ -1089,18 +1083,21 @@ class Media {
shell_exec("wget ".$url." -O ".$this->config["CoverDir"]."Staffeln/full/".$Film2["season_nr"].".jpg > /dev/null 2>&1"); //");//
if(filesize($this->config["CoverDir"]."Staffeln/full/".$Film2["season_nr"].".jpg")>0){
echo "done".PHP_EOL;
shell_exec("convert ".$this->config["CoverDir"]."Staffeln/full/".$Film2["season_nr"].".jpg".
" -bordercolor White -border 1 -fuzz 50%% -trim -bordercolor White +repage -resize 5000x150\> ".
$this->config["CoverDir"]."Staffeln/low/".$Film2["season_nr"].".jpg");
shell_exec("convert ".$this->config["CoverDir"]."Staffeln/full/".$Film2["season_nr"].".jpg".
" -bordercolor White -border 1 -fuzz 50%% -trim -bordercolor White +repage -resize 5000x600\> ".
$this->config["CoverDir"]."Staffeln/high/".$Film2["season_nr"].".jpg");
}else{
shell_exec("rm ".$this->config["CoverDir"]."Staffeln/full/".$Film2["season_nr"].".jpg");
echo "fail".PHP_EOL;
$counterNotFound++;
}
}else{ echo " Cover für season_nr: ".$Film2["season_nr"]." existiert bereits!".PHP_EOL;}
if(file_exists($this->config["CoverDir"]."Staffeln/full/".$Film2["season_nr"].".jpg") AND !file_exists($this->config["CoverDir"]."Staffeln/low/".$Film2["season_nr"].".jpg")){
shell_exec("convert ".$this->config["CoverDir"]."Staffeln/full/".$Film2["season_nr"].".jpg".
" -bordercolor White -border 1 -fuzz 50%% -trim -bordercolor White +repage -resize 5000x150\> ".
$this->config["CoverDir"]."Staffeln/low/".$Film2["season_nr"].".jpg");
shell_exec("convert ".$this->config["CoverDir"]."Staffeln/full/".$Film2["season_nr"].".jpg".
" -bordercolor White -border 1 -fuzz 50%% -trim -bordercolor White +repage -resize 5000x600\> ".
$this->config["CoverDir"]."Staffeln/high/".$Film2["season_nr"].".jpg");
}
}
}
echo $this->Console->getColoredString("Coverdownload > Upload auf FTP Server", "black", "light_gray") .PHP_EOL;
......
......@@ -17,6 +17,8 @@ do{
echo " checkmd5 Filme überprüfen mit md5".PHP_EOL;
echo " nfo* (4) nfo Datei zu jeden film schreiben".PHP_EOL;
echo " (Auch ohne Internet möglich, nur DB muss verfügbar sein)".PHP_EOL;
echo " serien Serien Umbennen usw.".PHP_EOL;
echo " einlesen (1) Serien einlesen ".PHP_EOL;
echo " cover (2) Läd die Cover herrunter!".PHP_EOL;
echo " clean Löscht alle Cachedateien!".PHP_EOL;
//echo " all Läd alle Cover neu herrunter".PHP_EOL;
......@@ -36,6 +38,13 @@ do{
echo $Console->getColoredString("Zweiter Paramter Vergessen!", "red", "light_gray") .PHP_EOL;
}
break;
case "serien":
if(isset($nameArr[1])){
echo $Media->serien($nameArr[1]);
}else{
echo $Console->getColoredString("Zweiter Paramter Vergessen!", "red", "light_gray") .PHP_EOL;
}
break;
case "config":
echo $Media->config($nameArr[1]);
break;
......
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