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';
 }
예제 #2
0
 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, '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);
 }
 public function getBuiltinCategories()
 {
     $result = parent::getBuiltinCategories();
     // allow adding of adhoc categories
     $result['readonly'] = false;
     return $result;
 }