1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-04 15:12:23 -05:00

Testing fix for torrent download issues from ezrss

This commit is contained in:
echel0n 2014-07-28 14:24:02 -07:00
parent 19a89d453c
commit e6c8982d2b
3 changed files with 3 additions and 4 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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: