mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Merge pull request #1209 from abeloin/patch-findpropers
Fix no attribute while search for proper.
This commit is contained in:
commit
afa1604641
@ -146,7 +146,7 @@ class ProperFinder():
|
|||||||
curProper.content = None
|
curProper.content = None
|
||||||
|
|
||||||
# filter release
|
# filter release
|
||||||
bestResult = pickBestResult(curProper)
|
bestResult = pickBestResult(curProper, parse_result.show)
|
||||||
if not bestResult:
|
if not bestResult:
|
||||||
logger.log(u"Proper " + curProper.name + " were rejected by our release filters.", logger.DEBUG)
|
logger.log(u"Proper " + curProper.name + " were rejected by our release filters.", logger.DEBUG)
|
||||||
continue
|
continue
|
||||||
|
@ -187,7 +187,7 @@ def filter_release_name(name, filter_words):
|
|||||||
return False
|
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]
|
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)
|
logger.log(u"Picking the best result out of " + str([x.name for x in results]), logger.DEBUG)
|
||||||
@ -201,11 +201,17 @@ def pickBestResult(results, show=None, quality_list=None):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# filter out possible bad torrents from providers such as ezrss
|
# filter out possible bad torrents from providers such as ezrss
|
||||||
|
if isinstance(cur_result, sickbeard.classes.SearchResult):
|
||||||
if cur_result.resultType == "torrent" and sickbeard.TORRENT_METHOD != "blackhole":
|
if cur_result.resultType == "torrent" and sickbeard.TORRENT_METHOD != "blackhole":
|
||||||
if not cur_result.url.startswith('magnet'):
|
if not cur_result.url.startswith('magnet'):
|
||||||
cur_result.content = cur_result.provider.getURL(cur_result.url)
|
cur_result.content = cur_result.provider.getURL(cur_result.url)
|
||||||
if not cur_result.content:
|
if not cur_result.content:
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
|
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
|
# build the black And white list
|
||||||
if cur_result.show.is_anime:
|
if cur_result.show.is_anime:
|
||||||
|
Loading…
Reference in New Issue
Block a user