diff --git a/sickbeard/clients/generic.py b/sickbeard/clients/generic.py index 7a1ef698..91c0539d 100644 --- a/sickbeard/clients/generic.py +++ b/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() diff --git a/sickbeard/config.py b/sickbeard/config.py index b792b0df..e3bc14c6 100644 --- a/sickbeard/config.py +++ b/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: