function __construct(Services_Settings_Container $settings, array $nzbHandling) { parent::__construct($settings, 'SABnzbd', 'SAB', $nzbHandling); $sabnzbd = $nzbHandling['sabnzbd']; # prepare sabnzbd url $this->_url = $sabnzbd['url'] . 'api?mode=addurl&apikey=' . $sabnzbd['apikey'] . '&output=jsonp'; }
function __construct(Services_Settings_Container $settings, array $nzbHandling) { parent::__construct($settings, 'Save', 'Save', $nzbHandling); $this->_localDir = $nzbHandling['local_dir']; if (empty($this->_localDir)) { throw new InvalidLocalDirException("Unable to save NZB file, local dir in config is empty"); } # if }
function __construct(Services_Settings_Container $settings, array $nzbHandling) { parent::__construct($settings, 'SABnzbd', 'SAB', $nzbHandling); $sabnzbd = $nzbHandling['sabnzbd']; $this->_sabnzbd = $sabnzbd; # prepare sabnzbd url $this->_url = $sabnzbd['url'] . 'api?mode=addfile&apikey=' . $sabnzbd['apikey'] . '&output=text'; $this->_username = $sabnzbd['username']; $this->_password = $sabnzbd['password']; }
function __construct(Services_Settings_Container $settings, array $nzbHandling) { parent::__construct($settings, 'NZBGet', 'D/L', $nzbHandling); $nzbget = $nzbHandling['nzbget']; $this->_host = $nzbget['host']; $this->_timeout = $nzbget['timeout']; $this->_url = "http://" . $nzbget['host'] . ":" . $nzbget['port'] . "/jsonrpc"; $this->_username = $nzbget['username']; $this->_password = $nzbget['password']; }
function __construct(Services_Settings_Container $settings, array $nzbHandling) { parent::__construct($settings, 'Runcommand', 'Run', $nzbHandling); /* * Make sure we don't try to run empty commands, as this will throw warnings * in PHP */ $this->_cmdToRun = $nzbHandling['command']; if (empty($this->_cmdToRun)) { throw new Exception("command in handler is empty but 'runcommand' option chosen!"); } # if $this->_localDir = $nzbHandling['local_dir']; if (empty($this->_localDir)) { throw new InvalidLocalDirException("Unable to save NZB file, local dir in config is empty"); } # if }
function __construct(Services_Settings_Container $settings, array $nzbHandling) { parent::__construct($settings, 'Display', 'Show', $nzbHandling); }