'Jackett', 'enabled' => true, 'image' => 'plugins/images/tabs/jackett.png', 'category' => 'Utility', 'settings' => array( 'Enable' => array( array( 'type' => 'switch', 'name' => 'homepageJackettEnabled', 'label' => 'Enable', 'value' => $this->config['homepageJackettEnabled'] ), array( 'type' => 'select', 'name' => 'homepageJackettAuth', 'label' => 'Minimum Authentication', 'value' => $this->config['homepageJackettAuth'], 'options' => $this->groupOptions ) ), 'Connection' => array( array( 'type' => 'input', 'name' => 'jackettURL', 'label' => 'URL', 'value' => $this->config['jackettURL'], 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.', 'placeholder' => 'http(s)://hostname:port' ), array( 'type' => 'password-alt', 'name' => 'jackettToken', 'label' => 'Token', 'value' => $this->config['jackettToken'] ) ), 'Options' => array(), ) ); } public function jackettHomepagePermissions($key = null) { $permissions = [ 'main' => [ 'enabled' => [ 'homepageJackettEnabled' ], 'auth' => [ 'homepageJackettAuth' ], 'not_empty' => [ 'jackettURL', 'jackettToken' ] ] ]; if (array_key_exists($key, $permissions)) { return $permissions[$key]; } elseif ($key == 'all') { return $permissions; } else { return []; } } public function homepageOrderJackett() { if ($this->homepageItemPermissions($this->jackettHomepagePermissions('main'))) { return '