Browse Source

getDelugeHomepageQueue() Fix

/api/v2/homepage/deluge/queue will return a 500 due to class deluge expecting three arguments. Added $options.
Jesse Hickman 4 years ago
parent
commit
3e78f274c5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      api/homepage/deluge.php

+ 3 - 2
api/homepage/deluge.php

@@ -126,7 +126,8 @@ trait DelugeHomepageItem
 			return false;
 		}
 		try {
-			$deluge = new deluge($this->config['delugeURL'], $this->decrypt($this->config['delugePassword']));
+			$options = $this->requestOptions($this->config['delugeURL'], $this->config['delugeRefresh'], $this->config['delugeDisableCertCheck'], $this->config['delugeUseCustomCertificate'], ['organizr_cert' => $this->getCert(), 'custom_cert' => $this->getCustomCert()]);
+			$deluge = new deluge($this->config['delugeURL'], $this->decrypt($this->config['delugePassword']),$options);
 			$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');
 			foreach ($torrents as $key => $value) {
 				$tempStatus = $this->delugeStatus($value->queue, $value->state, $value->progress);
@@ -161,4 +162,4 @@ trait DelugeHomepageItem
 		}
 		return ($state) ? $state : $status;
 	}
-}
+}