From e6c8982d2bb7cf3606ed4e0a1c062c693dc1507b Mon Sep 17 00:00:00 2001 From: echel0n Date: Mon, 28 Jul 2014 14:24:02 -0700 Subject: [PATCH] Testing fix for torrent download issues from ezrss --- sickbeard/clients/generic.py | 1 + sickbeard/providers/generic.py | 2 +- sickbeard/tvcache.py | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sickbeard/clients/generic.py b/sickbeard/clients/generic.py index 4f5081ec..aae58623 100644 --- a/sickbeard/clients/generic.py +++ b/sickbeard/clients/generic.py @@ -142,6 +142,7 @@ class GenericClient(object): def _get_torrent_hash(self, result): + result.hash = None if result.url.startswith('magnet'): result.hash = re.findall('urn:btih:([\w]{32,40})', result.url)[0] if len(result.hash) == 32: diff --git a/sickbeard/providers/generic.py b/sickbeard/providers/generic.py index ea2f2cb3..8d53c965 100644 --- a/sickbeard/providers/generic.py +++ b/sickbeard/providers/generic.py @@ -407,7 +407,7 @@ class GenericProvider: logger.log(u"Separating full season result to check for later", logger.DEBUG) # validate torrent file if not magnet link to avoid invalid torrent links - if self.providerType == sickbeard.providers.generic.GenericProvider.TORRENT: + if self.providerType == self.TORRENT: client = clients.getClientIstance(sickbeard.TORRENT_METHOD)() result = client._get_torrent_hash(result) if not result.hash: diff --git a/sickbeard/tvcache.py b/sickbeard/tvcache.py index 553853f9..18067799 100644 --- a/sickbeard/tvcache.py +++ b/sickbeard/tvcache.py @@ -357,9 +357,7 @@ class TVCache(): result.quality = curQuality result.release_group = curReleaseGroup result.version = curVersion - result.content = self.provider.getURL(url) \ - if self.provider.providerType == sickbeard.providers.generic.GenericProvider.TORRENT \ - and not url.startswith('magnet') else None + result.content = None # validate torrent file if not magnet link to avoid invalid torrent links if self.provider.providerType == sickbeard.providers.generic.GenericProvider.TORRENT: