mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-05 10:58:01 -05:00
Added simple url check
This commit is contained in:
parent
b67ef81337
commit
6b915ebc1c
@ -18,6 +18,7 @@ class GenericClient(object):
|
||||
self.username = sickbeard.TORRENT_USERNAME if username is None else username
|
||||
self.password = sickbeard.TORRENT_PASSWORD if password is None else password
|
||||
self.host = sickbeard.TORRENT_HOST if host is None else host
|
||||
self.rpcurl = sickbeard.TORRENT_RPCURL
|
||||
|
||||
self.url = None
|
||||
self.response = None
|
||||
|
@ -30,7 +30,16 @@ class TransmissionAPI(GenericClient):
|
||||
|
||||
super(TransmissionAPI, self).__init__('Transmission', host, username, password)
|
||||
|
||||
self.url = self.host + sickbeard.TORRENT_RPCURL + '/rpc'
|
||||
if not self.host.endswith('/'):
|
||||
self.host = self.host + '/'
|
||||
|
||||
if self.rpcurl.startswith('/'):
|
||||
self.rpcurl = self.rpcurl[1:]
|
||||
|
||||
if self.rpcurl.endswith('/'):
|
||||
self.rpcurl = self.rpcurl[:-1]
|
||||
|
||||
self.url = self.host + self.rpcurl + '/rpc'
|
||||
|
||||
def _get_auth(self):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user