Allow https for Transmission

close #3880
This commit is contained in:
Ruud
2014-09-22 21:53:27 +02:00
parent 6fa6d530ec
commit b1f88c1c48
+5 -5
View File
@@ -25,7 +25,7 @@ class Transmission(DownloaderBase):
def connect(self): def connect(self):
# Load host from config and split out port. # Load host from config and split out port.
host = cleanHost(self.conf('host'), protocol = False).split(':') host = cleanHost(self.conf('host')).rstrip('/').rsplit(':', 1)
if not isInt(host[1]): if not isInt(host[1]):
log.error('Config properties are not filled in correctly, port is missing.') log.error('Config properties are not filled in correctly, port is missing.')
return False return False
@@ -162,11 +162,11 @@ class Transmission(DownloaderBase):
class TransmissionRPC(object): class TransmissionRPC(object):
"""TransmissionRPC lite library""" """TransmissionRPC lite library"""
def __init__(self, host = 'localhost', port = 9091, rpc_url = 'transmission', username = None, password = None): def __init__(self, host = 'http://localhost', port = 9091, rpc_url = 'transmission', username = None, password = None):
super(TransmissionRPC, self).__init__() super(TransmissionRPC, self).__init__()
self.url = 'http://' + host + ':' + str(port) + '/' + rpc_url + '/rpc' self.url = host + ':' + str(port) + '/' + rpc_url + '/rpc'
self.tag = 0 self.tag = 0
self.session_id = 0 self.session_id = 0
self.session = {} self.session = {}
@@ -274,8 +274,8 @@ config = [{
}, },
{ {
'name': 'host', 'name': 'host',
'default': 'localhost:9091', 'default': 'http://localhost:9091',
'description': 'Hostname with port. Usually <strong>localhost:9091</strong>', 'description': 'Hostname with port. Usually <strong>http://localhost:9091</strong>',
}, },
{ {
'name': 'rpc_url', 'name': 'rpc_url',