Browse Source
Fix Transmission basic authentication
pull/7266/head
Johan Fleury
7 years ago
No known key found for this signature in database
GPG Key ID: 217CF1C9A9CCB8C7
1 changed files with
2 additions and
2 deletions
-
couchpotato/core/downloaders/transmission.py
|
|
@ -146,7 +146,7 @@ class Transmission(DownloaderBase): |
|
|
|
""" |
|
|
|
https://trac.transmissionbt.com/browser/branches/2.8x/libtransmission/transmission.h#L1853 |
|
|
|
0 = Torrent is stopped |
|
|
|
1 = Queued to check files |
|
|
|
1 = Queued to check files |
|
|
|
2 = Checking files |
|
|
|
3 = Queued to download |
|
|
|
4 = Downloading |
|
|
@ -212,7 +212,7 @@ class TransmissionRPC(object): |
|
|
|
self.session = {} |
|
|
|
if username and password: |
|
|
|
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
|
|
|
password_manager.add_password(realm = 'Transmission', uri = self.url, user = username, passwd = password) |
|
|
|
password_manager.add_password(realm = None, uri = self.url, user = username, passwd = password) |
|
|
|
opener = urllib2.build_opener(urllib2.HTTPBasicAuthHandler(password_manager)) |
|
|
|
opener.addheaders = [('User-agent', 'couchpotato-transmission-client/1.0')] |
|
|
|
urllib2.install_opener(opener) |
|
|
|