Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed.

This commit is contained in:
JackDandy 2015-02-12 21:28:42 +00:00
parent 1abd4e6013
commit 65007c953d
2 changed files with 3 additions and 1 deletions

View file

@ -38,6 +38,7 @@
* Change to ensure uTorrent API parameters are ordered for uT 2.2.1 compatibility
[develop changelog]
* Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed
### 0.6.4 (2015-02-10 20:20:00 UTC)

View file

@ -35,7 +35,8 @@ class uTorrentAPI(GenericClient):
return super(uTorrentAPI, self)._request(
method=method,
params='token=%s&%s' % (self.auth, '&'.join([u'%s' % urllib.urlencode(dict([[key, str(value)]])) for key, value in params.iteritems()])) if any(params) else params,
params='token={0:s}&{1:s}'.format(self.auth, '&'.join(
['%s' % urllib.urlencode(dict([[key, str(value)]])) for key, value in params.iteritems()])) if any(params) else params,
files=files)
def _get_auth(self):