mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Further corrections for torrent download issues related to content being empty and not properly checked in advance.
This commit is contained in:
parent
52010d9951
commit
6e6ae5bb87
@ -142,11 +142,12 @@ class GenericClient(object):
|
||||
|
||||
def _get_torrent_hash(self, result):
|
||||
|
||||
torrent_hash = None
|
||||
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()
|
||||
else:
|
||||
elif result.content:
|
||||
info = bdecode(result.content)["info"]
|
||||
torrent_hash = sha1(bencode(info)).hexdigest()
|
||||
|
||||
|
@ -191,11 +191,6 @@ def change_VERSION_NOTIFY(version_notify):
|
||||
if oldSetting == False and version_notify == True:
|
||||
sickbeard.versionCheckScheduler.action.run() # @UndefinedVariable
|
||||
|
||||
def change_VERSION(version):
|
||||
if sickbeard.version.SICKBEARD_VERSION != version:
|
||||
|
||||
sickbeard.versionCheckScheduler.action.run() # @UndefinedVariable
|
||||
|
||||
def CheckSection(CFG, sec):
|
||||
""" Check if INI section exists, if not create it """
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user