function reDownload() { $JD = new JD($this->A("JDownloadJDID")); $s = $JD->download($this->A("JDownloadFilename"), $this->A("JDownloadURL"), $this->A("JDownloadRenameto"), new Serie($this->A("JDownloadSerieID"))); if ($s) { echo "<p>Download gestartet</p>"; } else { echo "<p>Fehler</p>"; } }
public function download(RSSFilter $RSF, $filename, $page, $targetFileName, Serie $Serie) { $usableHosts = $this->getAvailableHosts($RSF); if (count($usableHosts) == 0) { return array("You did not select any hosts to download from", ""); } $JD = new JD($RSF->A("RSSFilterJDID")); foreach (self::$links[$page] as $link) { $url = parse_url($link); #print_r($url); #echo $link."\n"; $found = false; foreach ($usableHosts as $host) { if (stripos($url["host"], $host) === false) { continue; } #echo Serie::determineQuality($link); #echo $Serie->A("quality"); if (Serie::determineQuality($link) != SerieGUI::getQualities($Serie->A("quality"))) { continue; } $found = $link; } if (!$found) { continue; } try { $JD->download($link, $filename, $targetFileName, $Serie); } catch (Exception $e) { } break; } return true; }
public function download($link) { $JD = new JD($this->A("RSSFilterJDID")); try { $JD->download($link, $link); } catch (Exception $e) { } return true; }