mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-16 00:25:31 +01:00
The transmission url detection now :
- is executed only if the url is not already ending with rpc - detects ports up to 6 digits long (changed from 4)
This commit is contained in:
@@ -85,10 +85,12 @@ def torrentAction(method, arguments):
|
||||
if host.endswith('/'):
|
||||
host = host[:-1]
|
||||
|
||||
if host.endswith(':\d{2,4}'):
|
||||
host = host + "/transmission/rpc"
|
||||
else
|
||||
host = host + "/rpc"
|
||||
if not host.endswith('/rpc'):
|
||||
if host.endswith(':\d{2,6}'):
|
||||
host = host + "/transmission/rpc"
|
||||
else:
|
||||
host = host + "/rpc"
|
||||
|
||||
request = urllib2.Request(host)
|
||||
if username and password:
|
||||
base64string = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
|
||||
|
||||
Reference in New Issue
Block a user