function __construct(SpotSettings $settings, array $nzbHandling)
 {
     parent::__construct($settings, 'SABnzbd', 'SAB', $nzbHandling);
     $sabnzbd = $nzbHandling['sabnzbd'];
     # prepare sabnzbd url
     $this->_url = $sabnzbd['url'] . 'sabnzbd/api?mode=addurl&apikey=' . $sabnzbd['apikey'] . '&output=jsonp';
 }
Beispiel #2
0
 function __construct(SpotSettings $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(SpotSettings $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->_credentials = base64_encode($nzbget['username'] . ":" . $nzbget['password']);
	} # __construct
Beispiel #4
0
 function __construct(SpotSettings $settings, array $nzbHandling)
 {
     parent::__construct($settings, 'Runcommand', 'Run', $nzbHandling);
     # als het commando leeg is, gooi een exception anders geeft php een warning
     $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
 }
Beispiel #5
0
 public function getCategories()
 {
     $result = parent::getCategories();
     // allow adding of adhoc categories
     $result['readonly'] = false;
     return $result;
 }
Beispiel #6
0
 function __construct(SpotSettings $settings, array $nzbHandling)
 {
     parent::__construct($settings, 'Display', 'Show', $nzbHandling);
 }
	function __construct(SpotSettings $settings, array $nzbHandling)
	{
		parent::__construct($settings, 'Disable', 'Disable', $nzbHandling);
		
	} # __construct