From 0925f1312d1bbf59b344e17e3047292bf04204a7 Mon Sep 17 00:00:00 2001 From: Dean Gardiner Date: Mon, 25 Nov 2013 22:44:19 +1300 Subject: [PATCH] Fixed refresh action - changed show searcher to bind to 'season' and 'episode' media types for '.searcher.single' as well. --- couchpotato/core/media/show/searcher/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/media/show/searcher/main.py b/couchpotato/core/media/show/searcher/main.py index 4ed791f..1df6c6f 100644 --- a/couchpotato/core/media/show/searcher/main.py +++ b/couchpotato/core/media/show/searcher/main.py @@ -1,6 +1,6 @@ from couchpotato import get_session, Env from couchpotato.core.event import addEvent, fireEvent -from couchpotato.core.helpers.variable import getTitle, tryInt +from couchpotato.core.helpers.variable import getTitle, tryInt, toIterable from couchpotato.core.logger import CPLog from couchpotato.core.media._base.searcher.main import SearchSetupError from couchpotato.core.plugins.base import Plugin @@ -13,6 +13,8 @@ log = CPLog(__name__) class ShowSearcher(Plugin): + type = ['show', 'season', 'episode'] + in_progress = False # TODO come back to this later, think this could be handled better @@ -29,7 +31,9 @@ class ShowSearcher(Plugin): self.query_condenser = QueryCondenser() - addEvent('show.searcher.single', self.single) + for type in toIterable(self.type): + addEvent('%s.searcher.single' % type, self.single) + addEvent('searcher.get_search_title', self.getSearchTitle) addEvent('searcher.correct_match', self.correctMatch)