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:
parent
19a89d453c
commit
e6c8982d2b
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user