mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00: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
2 changed files with 2 additions and 6 deletions
|
@ -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 a new issue