From 8aba7825dc91817e4e842ddbd4353377ee7fb1b7 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 14 Jun 2013 21:24:38 +0200 Subject: [PATCH] Only show to_early when it has items --- couchpotato/core/plugins/searcher/main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/plugins/searcher/main.py b/couchpotato/core/plugins/searcher/main.py index 98b60825..118a7372 100644 --- a/couchpotato/core/plugins/searcher/main.py +++ b/couchpotato/core/plugins/searcher/main.py @@ -148,6 +148,7 @@ class Searcher(Plugin): available_status, ignored_status = fireEvent('status.get', ['available', 'ignored'], single = True) found_releases = [] + too_early_to_search = [] default_title = getTitle(movie['library']) if not default_title: @@ -157,12 +158,11 @@ class Searcher(Plugin): fireEvent('notify.frontend', type = 'searcher.started.%s' % movie['id'], data = True, message = 'Searching for "%s"' % default_title) - no_quality_match = [] ret = False for quality_type in movie['profile']['types']: if not self.conf('always_search') and not self.couldBeReleased(quality_type['quality']['identifier'] in pre_releases, release_dates): - no_quality_match.append(quality_type['quality']['identifier']) + too_early_to_search.append(quality_type['quality']['identifier']) continue has_better_quality = 0 @@ -268,7 +268,9 @@ class Searcher(Plugin): # Break if CP wants to shut down if self.shuttingDown() or ret: break - log.info('Too early to search for %s, %s', (no_quality_match, default_title)) + + if len(too_early_to_search) > 0: + log.info2('Too early to search for %s, %s', (too_early_to_search, default_title)) fireEvent('notify.frontend', type = 'searcher.ended.%s' % movie['id'], data = True)