Browse Source

Further corrections for torrent download issues related to content being empty and not properly checked in advance.

tags/release_0.1.0
echel0n 11 years ago
parent
commit
6e6ae5bb87
  1. 3
      sickbeard/clients/generic.py
  2. 5
      sickbeard/config.py

3
sickbeard/clients/generic.py

@ -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()

5
sickbeard/config.py

@ -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…
Cancel
Save