diff --git a/sickbeard/properFinder.py b/sickbeard/properFinder.py index d5dbf6b62663b20e5ae8d6d73a13ba0da33ba561..fc217b9b9a75dd708f89c6121b93e4f4121fa6df 100644 --- a/sickbeard/properFinder.py +++ b/sickbeard/properFinder.py @@ -87,17 +87,21 @@ class ProperFinder(): logger.log(u"Error while searching " + curProvider.name + ", skipping: " + ex(e), logger.ERROR) logger.log(traceback.format_exc(), logger.DEBUG) continue - finally: - threading.currentThread().name = origThreadName # if they haven't been added by a different provider than add the proper to the list for x in curPropers: + if not re.search('(^|[\. _-])(proper|repack)([\. _-]|$)', x.name, re.I): + logger.log(u'findPropers returned a non-proper, we have caught and skipped it but please report this', logger.WARNING) + continue + name = self._genericName(x.name) if not name in propers: logger.log(u"Found new proper: " + x.name, logger.DEBUG) x.provider = curProvider propers[name] = x + threading.currentThread().name = origThreadName + # take the list of unique propers and get it sorted by sortedPropers = sorted(propers.values(), key=operator.attrgetter('date'), reverse=True) finalPropers = [] @@ -205,7 +209,7 @@ class ProperFinder(): historyResults = myDB.select( "SELECT resource FROM history " + "WHERE showid = ? AND season = ? AND episode = ? AND quality = ? AND date >= ? " + - "AND action IN (" + ",".join([str(x) for x in Quality.SNATCHED]) + ")", + "AND action IN (" + ",".join([str(x) for x in Quality.SNATCHED + Quality.DOWNLOADED]) + ")", [curProper.indexerid, curProper.season, curProper.episode, curProper.quality, historyLimit.strftime(history.dateFormat)])