Merge pull request #2549 from fuzeman/tv_searcher

[TV] Searcher cleanup and matcher updates
This commit is contained in:
Joel Kåberg
2013-12-03 23:16:11 -08:00
14 changed files with 243 additions and 154 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ class Matcher(Plugin):
if fireEvent('searcher.correct_match', chain, release, media, quality, single = True):
return chain
return None
return False
def chainMatch(self, chain, group, tags):
found_tags = []
@@ -50,7 +50,7 @@ class Matcher(Plugin):
return set([key for key, value in tags.items() if None not in value]) == set(found_tags)
def correctIdentifier(self, chain, media):
required_id = fireEvent('searcher.get_media_identifier', media['library'], single = True)
required_id = fireEvent('library.identifier', media['library'], single = True)
if 'identifier' not in chain.info:
return False
@@ -73,7 +73,7 @@ class Matcher(Plugin):
return True
def correctTitle(self, chain, media):
root_library = fireEvent('searcher.get_media_root', media['library'], single = True)
root_library = media['library']['root_library']
if 'show_name' not in chain.info or not len(chain.info['show_name']):
log.info('Wrong: missing show name in parsed result')