From 2c0af15325939a653c1560fea0ac8a073c86fcd2 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 11 Sep 2012 20:48:27 +0200 Subject: [PATCH] Torcache doesn't give back proper 404 --- couchpotato/core/downloaders/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/downloaders/base.py b/couchpotato/core/downloaders/base.py index eb704205..504ddac8 100644 --- a/couchpotato/core/downloaders/base.py +++ b/couchpotato/core/downloaders/base.py @@ -67,7 +67,10 @@ class Downloader(Plugin): for source in sources: try: - filedata = self.urlopen(source % torrent_hash, show_error = False) + filedata = self.urlopen(source % torrent_hash, headers = {'Referer': ''}, show_error = False) + if 'torcache' in filedata and 'file not found' in filedata.lower(): + continue + return filedata except: log.debug('Torrent hash "%s" wasn\'t found on: %s', (torrent_hash, source))