Functionify
This commit is contained in:
@@ -344,10 +344,7 @@ class iTunesPlugin(BeetsPlugin):
|
||||
if self.method in ['lookup', 'lookup (search fallback)']:
|
||||
choices += [PromptChoice('c', 'searCh iTunes', self.prompt_search)]
|
||||
|
||||
no_itunes_matches = 0
|
||||
for match in task.candidates:
|
||||
if match.info.data_source == 'iTunes':
|
||||
no_itunes_matches += 1
|
||||
no_itunes_matches = len(list(filter(lambda match: match.info.data_source == 'iTunes', task.candidates)))
|
||||
if no_itunes_matches == 1 and task.candidates[0].info.data_source == 'iTunes':
|
||||
print_(colorize('text_highlight', 'This is the only iTunes Match'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user