1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Added Torrage.com as alternative site to Torcache.net

This commit is contained in:
echel0n 2014-05-19 06:27:38 -07:00
parent 66e499ab23
commit e7931f0c7f
3 changed files with 21 additions and 6 deletions

View File

@ -351,8 +351,13 @@ class KATProvider(generic.TorrentProvider):
try:
r = self.session.get('http://torcache.net/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to Torcache: " + ex(e), logger.ERROR)
return False
logger.log("Unable to connect to TORCACHE: " + ex(e), logger.ERROR)
try:
logger.log("Trying TORRAGE cache instead")
r = self.session.get('http://torrage.com/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to TORRAGE: " + ex(e), logger.ERROR)
return False
if not r.status_code == 200:
return False

View File

@ -243,8 +243,13 @@ class PublicHDProvider(generic.TorrentProvider):
try:
r = self.session.get('http://torcache.net/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to Torcache: " + ex(e), logger.ERROR)
return False
logger.log("Unable to connect to TORCACHE: " + ex(e), logger.ERROR)
try:
logger.log("Trying TORRAGE cache instead")
r = self.session.get('http://torrage.com/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to TORRAGE: " + ex(e), logger.ERROR)
return False
if not r.status_code == 200:
return False

View File

@ -332,8 +332,13 @@ class ThePirateBayProvider(generic.TorrentProvider):
try:
r = self.session.get('http://torcache.net/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to Torcache: " + ex(e), logger.ERROR)
return False
logger.log("Unable to connect to TORCACHE: " + ex(e), logger.ERROR)
try:
logger.log("Trying TORRAGE cache instead")
r = self.session.get('http://torrage.com/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to TORRAGE: " + ex(e), logger.ERROR)
return False
if not r.status_code == 200:
return False