|
|
@@ -793,7 +793,7 @@ function rTorrentConnect()
|
|
|
if ($GLOBALS['homepagerTorrentEnabled'] && !empty($GLOBALS['rTorrentURL']) && qualifyRequest($GLOBALS['homepagerTorrentAuth'])) {
|
|
|
try {
|
|
|
$torrents = array();
|
|
|
- $digest = qualifyURL($GLOBALS['rTorrentURL'], true);
|
|
|
+ $digest = (empty($GLOBALS['rTorrentURLOverride'])) ? qualifyURL($GLOBALS['rTorrentURL'], true) : qualifyURL(checkOverrideURL($GLOBALS['rTorrentURL'], $GLOBALS['rTorrentURLOverride']), true);
|
|
|
$passwordInclude = ($GLOBALS['rTorrentUsername'] != '' && $GLOBALS['rTorrentPassword'] != '') ? $GLOBALS['rTorrentUsername'] . ':' . decrypt($GLOBALS['rTorrentPassword']) . "@" : '';
|
|
|
$extraPath = (strpos($GLOBALS['rTorrentURL'], '.php') !== false) ? '' : '/RPC2';
|
|
|
$extraPath = (empty($GLOBALS['rTorrentURLOverride'])) ? $extraPath : '';
|
|
|
@@ -2205,9 +2205,10 @@ function testAPIConnection($array)
|
|
|
case 'rtorrent':
|
|
|
if (!empty($GLOBALS['rTorrentURL'])) {
|
|
|
try {
|
|
|
- $digest = qualifyURL($GLOBALS['rTorrentURL'], true);
|
|
|
+ $digest = (empty($GLOBALS['rTorrentURLOverride'])) ? qualifyURL($GLOBALS['rTorrentURL'], true) : qualifyURL(checkOverrideURL($GLOBALS['rTorrentURL'], $GLOBALS['rTorrentURLOverride']), true);
|
|
|
$passwordInclude = ($GLOBALS['rTorrentUsername'] != '' && $GLOBALS['rTorrentPassword'] != '') ? $GLOBALS['rTorrentUsername'] . ':' . decrypt($GLOBALS['rTorrentPassword']) . "@" : '';
|
|
|
$extraPath = (strpos($GLOBALS['rTorrentURL'], '.php') !== false) ? '' : '/RPC2';
|
|
|
+ $extraPath = (empty($GLOBALS['rTorrentURLOverride'])) ? $extraPath : '';
|
|
|
$url = $digest['scheme'] . '://' . $passwordInclude . $digest['host'] . $digest['port'] . $digest['path'] . $extraPath;
|
|
|
$options = (localURL($url)) ? array('verify' => false) : array();
|
|
|
$data = xmlrpc_encode_request("system.listMethods", null);
|