TorrentDay: decoding error. fix #1260

This commit is contained in:
Ruud committed 2013-01-11 20:50:38 +01:00
1 parent 300f4738a0
commit 36e5c49147
2 files changed
+5 -2

No files matched your search

@@ -1,6 +1,6 @@
from bencode import bencode, bdecode from bencode import bencode, bdecode
from couchpotato.core.downloaders.base import Downloader from couchpotato.core.downloaders.base import Downloader
from couchpotato.core.helpers.encoding import isInt from couchpotato.core.helpers.encoding import isInt, ss
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from hashlib import sha1 from hashlib import sha1
from multipartpost import MultipartPostHandler from multipartpost import MultipartPostHandler
@@ -125,7 +125,7 @@ class uTorrentAPI(object):
def add_torrent_file(self, filename, filedata): def add_torrent_file(self, filename, filedata):
action = "action=add-file" action = "action=add-file"
return self._request(action, {"torrent_file": (filename, filedata)}) return self._request(action, {"torrent_file": (ss(filename), filedata)})
def set_torrent(self, hash, params): def set_torrent(self, hash, params):
action = "action=setprops&hash=%s" % hash action = "action=setprops&hash=%s" % hash
@@ -59,3 +59,6 @@ class TorrentDay(TorrentProvider):
'password': self.conf('password'), 'password': self.conf('password'),
'submit': 'submit', 'submit': 'submit',
}) })
def loginSuccess(self, output):
return 'Password not correct' not in output