mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
Fixed issues with torrent blackhole download issues.
This commit is contained in:
parent
a15258c784
commit
9761c6c6a3
2 changed files with 18 additions and 15 deletions
|
@ -408,11 +408,12 @@ class GenericProvider:
|
||||||
|
|
||||||
# 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 == self.TORRENT:
|
if self.providerType == self.TORRENT:
|
||||||
client = clients.getClientIstance(sickbeard.TORRENT_METHOD)()
|
if sickbeard.TORRENT_METHOD != "blackhole":
|
||||||
result = client._get_torrent_hash(result)
|
client = clients.getClientIstance(sickbeard.TORRENT_METHOD)()
|
||||||
if not result.hash:
|
result = client._get_torrent_hash(result)
|
||||||
logger.log(u'Unable to get torrent hash for ' + title + ', skipping it', logger.DEBUG)
|
if not result.hash:
|
||||||
continue
|
logger.log(u'Unable to get torrent hash for ' + title + ', skipping it', logger.DEBUG)
|
||||||
|
continue
|
||||||
|
|
||||||
if epNum not in results:
|
if epNum not in results:
|
||||||
results[epNum] = [result]
|
results[epNum] = [result]
|
||||||
|
|
|
@ -24,14 +24,15 @@ import sickbeard
|
||||||
|
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard.common import Quality
|
from sickbeard import clients
|
||||||
|
|
||||||
from sickbeard import helpers, show_name_helpers
|
from sickbeard import helpers, show_name_helpers
|
||||||
|
from sickbeard.providers.generic import GenericProvider
|
||||||
|
from sickbeard.common import Quality
|
||||||
from sickbeard.exceptions import MultipleShowObjectsException
|
from sickbeard.exceptions import MultipleShowObjectsException
|
||||||
from sickbeard.exceptions import AuthException
|
from sickbeard.exceptions import AuthException
|
||||||
from name_parser.parser import NameParser, InvalidNameException, InvalidShowException
|
|
||||||
from sickbeard.rssfeeds import RSSFeeds
|
from sickbeard.rssfeeds import RSSFeeds
|
||||||
from sickbeard import clients
|
|
||||||
|
from name_parser.parser import NameParser, InvalidNameException, InvalidShowException
|
||||||
|
|
||||||
class CacheDBConnection(db.DBConnection):
|
class CacheDBConnection(db.DBConnection):
|
||||||
def __init__(self, providerName):
|
def __init__(self, providerName):
|
||||||
|
@ -360,12 +361,13 @@ class TVCache():
|
||||||
result.content = None
|
result.content = 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 == GenericProvider.TORRENT:
|
||||||
client = clients.getClientIstance(sickbeard.TORRENT_METHOD)()
|
if sickbeard.TORRENT_METHOD != "blackhole":
|
||||||
result = client._get_torrent_hash(result)
|
client = clients.getClientIstance(sickbeard.TORRENT_METHOD)()
|
||||||
if not result.hash:
|
result = client._get_torrent_hash(result)
|
||||||
logger.log(u'Unable to get torrent hash for ' + title + ', skipping it', logger.DEBUG)
|
if not result.hash:
|
||||||
continue
|
logger.log(u'Unable to get torrent hash for ' + title + ', skipping it', logger.DEBUG)
|
||||||
|
continue
|
||||||
|
|
||||||
# add it to the list
|
# add it to the list
|
||||||
if epObj not in neededEps:
|
if epObj not in neededEps:
|
||||||
|
|
Loading…
Reference in a new issue