From 0ae2b034847277f2b180584589882c5ab9499327 Mon Sep 17 00:00:00 2001 From: Alexandre Beloin Date: Mon, 19 Jan 2015 21:29:19 -0500 Subject: [PATCH] Fix resultType error: remove resultType as object is sickbeard.classes.Proper and not sickbeard.classes.*SearchResult Fix 'NoneType' object has no attribute 'rls_ignore_words': See SiCKRAGETV/sickrage-issues#328 for more info --- sickbeard/properFinder.py | 2 +- sickbeard/search.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sickbeard/properFinder.py b/sickbeard/properFinder.py index 26aff18f..21507c3c 100644 --- a/sickbeard/properFinder.py +++ b/sickbeard/properFinder.py @@ -146,7 +146,7 @@ class ProperFinder(): curProper.content = None # filter release - bestResult = pickBestResult(curProper) + bestResult = pickBestResult(curProper, parse_result.show) if not bestResult: logger.log(u"Proper " + curProper.name + " were rejected by our release filters.", logger.DEBUG) continue diff --git a/sickbeard/search.py b/sickbeard/search.py index ce5cac2e..63a96615 100644 --- a/sickbeard/search.py +++ b/sickbeard/search.py @@ -187,7 +187,7 @@ def filter_release_name(name, filter_words): return False -def pickBestResult(results, show=None, quality_list=None): +def pickBestResult(results, show, quality_list=None): results = results if isinstance(results, list) else [results] logger.log(u"Picking the best result out of " + str([x.name for x in results]), logger.DEBUG) @@ -200,12 +200,10 @@ def pickBestResult(results, show=None, quality_list=None): if show and cur_result.show is not show: continue - # filter out possible bad torrents from providers such as ezrss - if cur_result.resultType == "torrent" and sickbeard.TORRENT_METHOD != "blackhole": - if not cur_result.url.startswith('magnet'): - cur_result.content = cur_result.provider.getURL(cur_result.url) - if not cur_result.content: - continue + if not cur_result.url.startswith('magnet'): + cur_result.content = cur_result.provider.getURL(cur_result.url) + if not cur_result.content: + continue # build the black And white list if cur_result.show.is_anime: