mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Should fix some utorrent, rtorrent and deluge
problems.
This commit essentially undoes 54afca0472
The utorrent, rtorrent and deluge methods were still using result.hash to set label, seed ratio and priority etc (instead of torrent_hash which the commit referenced above changed it to).
I've changed it back to result.hash in this commit.
Reference problem posts:
https://sickrage.tv/forums/forum/help-support/bug-issue-reports/7493-utorrent-unable-to-send-torrent
https://sickrage.tv/forums/forum/help-support/bug-issue-reports/7533-sickrage-not-sending-tv-label-to-utorrent
https://sickrage.tv/forums/forum/help-support/bug-issue-reports/7541-bug-rtorrent-unable-to-send-torrent
This commit is contained in:
parent
4b6602797f
commit
fc6fe9e777
1 changed files with 6 additions and 5 deletions
|
@ -143,14 +143,15 @@ class GenericClient(object):
|
|||
def _get_torrent_hash(self, result):
|
||||
|
||||
if result.url.startswith('magnet'):
|
||||
torrent_hash = re.findall('urn:btih:([\w]{32,40})', result.url)[0]
|
||||
if len(torrent_hash) == 32:
|
||||
torrent_hash = b16encode(b32decode(torrent_hash)).lower()
|
||||
result.hash = re.findall('urn:btih:([\w]{32,40})', result.url)[0]
|
||||
if len(result.hash) == 32:
|
||||
result.hash = b16encode(b32decode(torrent_hash)).lower()
|
||||
else:
|
||||
result.content = result.provider.getURL(result.url)
|
||||
info = bdecode(result.content)["info"]
|
||||
torrent_hash = sha1(bencode(info)).hexdigest()
|
||||
result.hash = sha1(bencode(info)).hexdigest()
|
||||
|
||||
return torrent_hash
|
||||
return result
|
||||
|
||||
def sendTORRENT(self, result):
|
||||
|
||||
|
|
Loading…
Reference in a new issue