From 368e30067bbb8479e33c45667d4f445b5e051313 Mon Sep 17 00:00:00 2001 From: Ade Date: Thu, 10 May 2018 10:33:52 +1200 Subject: [PATCH] Remove t411, kick ass --- headphones/searcher.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index 2211cc3b..a8bfca0a 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -14,7 +14,6 @@ # along with Headphones. If not, see . # NZBGet support added by CurlyMo as a part of XBian - XBMC on the Raspberry Pi -# t411 support added by a1ex, @likeitneverwentaway on github for maintenance from base64 import b16encode, b32decode from hashlib import sha1 @@ -833,19 +832,6 @@ def send_to_downloader(data, bestqual, album): torrent_name = helpers.replace_illegal_chars(folder_name) + '.torrent' download_path = os.path.join(headphones.CONFIG.TORRENTBLACKHOLE_DIR, torrent_name) - # Blackhole for t411 - if bestqual[2].lower().startswith("http://api.t411"): - if headphones.CONFIG.MAGNET_LINKS == 2: - try: - url = bestqual[2].split('TOKEN')[0] - token = bestqual[2].split('TOKEN')[1] - data = request.request_content(url, headers={'Authorization': token}) - torrent_to_file(download_path, data) - logger.info('Successfully converted magnet to torrent file') - except Exception as e: - logger.error("Error converting magnet link: %s" % str(e)) - return - if bestqual[2].lower().startswith("magnet:"): if headphones.CONFIG.MAGNET_LINKS == 1: try: @@ -1923,10 +1909,7 @@ def preprocess(resultlist): # Download the torrent file headers = {} - if result[3] == 'Kick Ass Torrents': - headers['Referer'] = 'https://torcache.net/' - headers['User-Agent'] = USER_AGENT - elif result[3] == 'Apollo.rip': + if result[3] == 'Apollo.rip': headers['User-Agent'] = 'Headphones' elif result[3] == 'Redacted': headers['User-Agent'] = 'Headphones'