From fdec80f6769a0e589c74905be53089536f46b856 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 11 Jun 2014 21:21:32 +0200 Subject: [PATCH] Set last_force_eta time --- couchpotato/core/media/movie/searcher.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/media/movie/searcher.py b/couchpotato/core/media/movie/searcher.py index 56a0ff9b..f8e27244 100644 --- a/couchpotato/core/media/movie/searcher.py +++ b/couchpotato/core/media/movie/searcher.py @@ -138,14 +138,15 @@ class MovieSearcher(SearcherBase, MovieTypeBase): fireEvent('media.delete', movie['_id'], single = True) return + fireEvent('notify.frontend', type = 'movie.searcher.started', data = {'_id': movie['_id']}, message = 'Searching for "%s"' % default_title) + # Ignore eta once every 7 days if not alway_search: prop_name = 'last_ignored_eta.%s' % movie['_id'] last_ignored_eta = float(Env.prop(prop_name, default = 0)) if last_ignored_eta > time.time() - 604800: ignore_eta = True - - fireEvent('notify.frontend', type = 'movie.searcher.started', data = {'_id': movie['_id']}, message = 'Searching for "%s"' % default_title) + Env.prop(prop_name, value = time.time()) db = get_db() @@ -238,7 +239,7 @@ class MovieSearcher(SearcherBase, MovieTypeBase): if outside_eta_results > 0: log.info('Found %s releases, but before ETA. Use dashboard to download manually', outside_eta_results) - message = 'Found %s releases for "%s" before ETA. Check them out on the dashboard.' % (outside_eta_results, default_title) + message = 'Found %s releases for "%s" before ETA. You can check them out on the dashboard.' % (outside_eta_results, default_title) fireEvent('media.available', message = message, data = {}) fireEvent('notify.frontend', type = 'movie.searcher.ended', data = {'_id': movie['_id']})