mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 06:15:09 -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):
|
def _get_torrent_hash(self, result):
|
||||||
|
|
||||||
|
result.hash = None
|
||||||
if result.url.startswith('magnet'):
|
if result.url.startswith('magnet'):
|
||||||
result.hash = re.findall('urn:btih:([\w]{32,40})', result.url)[0]
|
result.hash = re.findall('urn:btih:([\w]{32,40})', result.url)[0]
|
||||||
if len(result.hash) == 32:
|
if len(result.hash) == 32:
|
||||||
|
@ -407,7 +407,7 @@ class GenericProvider:
|
|||||||
logger.log(u"Separating full season result to check for later", logger.DEBUG)
|
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
|
# 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)()
|
client = clients.getClientIstance(sickbeard.TORRENT_METHOD)()
|
||||||
result = client._get_torrent_hash(result)
|
result = client._get_torrent_hash(result)
|
||||||
if not result.hash:
|
if not result.hash:
|
||||||
|
@ -357,9 +357,7 @@ class TVCache():
|
|||||||
result.quality = curQuality
|
result.quality = curQuality
|
||||||
result.release_group = curReleaseGroup
|
result.release_group = curReleaseGroup
|
||||||
result.version = curVersion
|
result.version = curVersion
|
||||||
result.content = self.provider.getURL(url) \
|
result.content = None
|
||||||
if self.provider.providerType == sickbeard.providers.generic.GenericProvider.TORRENT \
|
|
||||||
and not url.startswith('magnet') else None
|
|
||||||
|
|
||||||
# validate torrent file if not magnet link to avoid invalid torrent links
|
# validate torrent file if not magnet link to avoid invalid torrent links
|
||||||
if self.provider.providerType == sickbeard.providers.generic.GenericProvider.TORRENT:
|
if self.provider.providerType == sickbeard.providers.generic.GenericProvider.TORRENT:
|
||||||
|
Loading…
Reference in New Issue
Block a user