Merge pull request #1150 from Kraymer/lyrics_force

lyrics: add 'force' option
This commit is contained in:
Adrian Sampson 2014-12-18 03:59:12 +00:00
commit 4b575d79d3
2 changed files with 5 additions and 1 deletions

View file

@ -421,6 +421,7 @@ class LyricsPlugin(BeetsPlugin):
'google_API_key': None,
'google_engine_ID': u'009217259823014548361:lndtuqkycfu',
'fallback': None,
'force': False,
})
self.backends = [fetch_lyricswiki, fetch_lyricscom]
@ -456,7 +457,7 @@ class LyricsPlugin(BeetsPlugin):
if self.config['auto']:
for item in task.imported_items():
self.fetch_item_lyrics(session.lib, logging.DEBUG, item,
False, False)
False, self.config['force'])
def fetch_item_lyrics(self, lib, loglevel, item, write, force):
"""Fetch and store lyrics for a single item. If ``write``, then the

View file

@ -39,6 +39,9 @@ configuration file. The available options are:
- **fallback**: By default, the file will be left unchanged when no lyrics are
found. Use the empty string ``''`` to reset the lyrics in such a case.
Default: None.
- **force**: By default, beets won't fetch lyrics if the files already have
ones. To instead always fetch lyrics, set the ``force`` option to ``yes``.
Default: ``no``.
- **google_API_key**: Your Google API key (to enable the Google Custom Search
backend).
Default: None.