lyrics: simplify source handling a little

This commit is contained in:
wordofglass 2016-04-28 18:31:22 +02:00
parent 2928a16bd5
commit c3c7da8061

View file

@ -609,12 +609,12 @@ class LyricsPlugin(plugins.BeetsPlugin):
self._log.warn(u'To use the google lyrics source, you must '
u'provide an API key in the configuration. '
u'See the documentation for further details.')
available_sources.remove('google')
sources.remove('google')
if not HAS_BEAUTIFUL_SOUP:
self._log.warn(u'To use the google lyrics source, you must '
u'install the beautifulsoup4 module. See the '
u'documentation for further details.')
available_sources.remove('google')
sources.remove('google')
self.config['bing_lang_from'] = [
x.lower() for x in self.config['bing_lang_from'].as_str_seq()]
@ -626,7 +626,7 @@ class LyricsPlugin(plugins.BeetsPlugin):
u'documentation for further details.')
self.backends = [self.SOURCE_BACKENDS[source](self.config, self._log)
for source in sources if source in available_sources]
for source in sources]
def get_bing_access_token(self):
params = {