From 6bd762d9b6a89cc6f7bf9d2a8cda9827eddf8c0e Mon Sep 17 00:00:00 2001 From: rembo10 Date: Sat, 28 Apr 2012 14:32:02 +0530 Subject: [PATCH] Possible fix for IncompleteRead error when using NZBMatrix: Strip out leading 'The' in the search term which seems to cause it to hang --- headphones/searcher.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/headphones/searcher.py b/headphones/searcher.py index 79c08c11..03cfe3ec 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -149,6 +149,13 @@ def searchNZB(albumid=None, new=False, losslessOnly=False): else: categories = "22" maxsize = 300000000 + + # For some reason NZBMatrix is erroring out/timing out when the term starts with a "The" right now + # so we'll strip it out for the time being. This may get fixed on their end, it may not, but + # hopefully this will fix it for now. If you notice anything else it gets stuck on, please post it + # on Github so it can be added + if term.lower().startswith("the "): + term = term[4:] params = { "page": "download",