|
|
@@ -34,6 +34,12 @@ trait QBitTorrentHomepageItem
|
|
|
'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' => 'switch',
|
|
|
+ 'name' => 'qBittorrentDisableCertCheck',
|
|
|
+ 'label' => 'Disable Certificate Check',
|
|
|
+ 'value' => $this->config['qBittorrentDisableCertCheck']
|
|
|
+ ),
|
|
|
array(
|
|
|
'type' => 'select',
|
|
|
'name' => 'qBittorrentApiVersion',
|
|
|
@@ -123,7 +129,7 @@ trait QBitTorrentHomepageItem
|
|
|
$apiVersionQuery = ($this->config['qBittorrentApiVersion'] == '1') ? '/query/torrents?sort=' : '/api/v2/torrents/info?sort=';
|
|
|
$url = $digest['scheme'] . '://' . $digest['host'] . $digest['port'] . $digest['path'] . $apiVersionLogin;
|
|
|
try {
|
|
|
- $options = ($this->localURL($this->config['qBittorrentURL'])) ? array('verify' => false) : array();
|
|
|
+ $options = $this->requestOptions($this->config['qBittorrentURL'], $this->config['qBittorrentDisableCertCheck'], $this->config['homepageDownloadRefresh']);
|
|
|
$response = Requests::post($url, array(), $data, $options);
|
|
|
$reflection = new ReflectionClass($response->cookies);
|
|
|
$cookie = $reflection->getProperty("cookies");
|
|
|
@@ -215,7 +221,7 @@ trait QBitTorrentHomepageItem
|
|
|
$apiVersionQuery = ($this->config['qBittorrentApiVersion'] == '1') ? '/query/torrents?sort=' : '/api/v2/torrents/info?sort=';
|
|
|
$url = $digest['scheme'] . '://' . $digest['host'] . $digest['port'] . $digest['path'] . $apiVersionLogin;
|
|
|
try {
|
|
|
- $options = ($this->localURL($this->config['qBittorrentURL'])) ? array('verify' => false) : array();
|
|
|
+ $options = $this->requestOptions($this->config['qBittorrentURL'], $this->config['qBittorrentDisableCertCheck'], $this->config['homepageDownloadRefresh']);
|
|
|
$response = Requests::post($url, array(), $data, $options);
|
|
|
$reflection = new ReflectionClass($response->cookies);
|
|
|
$cookie = $reflection->getProperty("cookies");
|