Browse Source

Merge pull request #1602 from d-lindahl/v2-develop

Allow empty password for Deluge
causefx 5 years ago
parent
commit
3773d2557f
1 changed files with 3 additions and 7 deletions
  1. 3 7
      api/homepage/deluge.php

+ 3 - 7
api/homepage/deluge.php

@@ -64,6 +64,7 @@ trait DelugeHomepageItem
 						'type' => 'password',
 						'name' => 'delugePassword',
 						'label' => 'Password',
+						'help' => 'Note that using a blank password might not work correctly.',
 						'value' => $this->config['delugePassword']
 					)
 				),
@@ -96,7 +97,7 @@ trait DelugeHomepageItem
 				'Test Connection' => array(
 					array(
 						'type' => 'blank',
-						'label' => 'Please Save before Testing'
+						'label' => 'Please Save before Testing. Note that using a blank password might not work correctly.'
 					),
 					array(
 						'type' => 'button',
@@ -118,10 +119,6 @@ trait DelugeHomepageItem
 			$this->setAPIResponse('error', 'Deluge URL is not defined', 422);
 			return false;
 		}
-		if (empty($this->config['delugePassword'])) {
-			$this->setAPIResponse('error', 'Deluge Password is not defined', 422);
-			return false;
-		}
 		try {
 			$deluge = new deluge($this->config['delugeURL'], $this->decrypt($this->config['delugePassword']));
 			$torrents = $deluge->getTorrents(null, 'comment, download_payload_rate, eta, hash, is_finished, is_seed, message, name, paused, progress, queue, state, total_size, upload_payload_rate');
@@ -146,8 +143,7 @@ trait DelugeHomepageItem
 					'homepageDelugeAuth'
 				],
 				'not_empty' => [
-					'delugeURL',
-					'delugePassword'
+					'delugeURL'
 				]
 			]
 		];