Fixed refresh action - changed show searcher to bind to 'season' and 'episode' media types for '.searcher.single' as well.

This commit is contained in:
Dean Gardiner committed 2013-12-01 20:22:07 +13:00
1 parent efc02f66f5
commit 0925f1312d
1 file changed
+6 -2
+6 -2
View File
@@ -1,6 +1,6 @@
from couchpotato import get_session, Env from couchpotato import get_session, Env
from couchpotato.core.event import addEvent, fireEvent 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.logger import CPLog
from couchpotato.core.media._base.searcher.main import SearchSetupError from couchpotato.core.media._base.searcher.main import SearchSetupError
from couchpotato.core.plugins.base import Plugin from couchpotato.core.plugins.base import Plugin
@@ -13,6 +13,8 @@ log = CPLog(__name__)
class ShowSearcher(Plugin): class ShowSearcher(Plugin):
type = ['show', 'season', 'episode']
in_progress = False in_progress = False
# TODO come back to this later, think this could be handled better # TODO come back to this later, think this could be handled better
@@ -29,7 +31,9 @@ class ShowSearcher(Plugin):
self.query_condenser = QueryCondenser() 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.get_search_title', self.getSearchTitle)
addEvent('searcher.correct_match', self.correctMatch) addEvent('searcher.correct_match', self.correctMatch)