Modified the name of the fetchart plugin switch from missing to quiet

This commit is contained in:
euri10 2017-09-05 18:27:47 +02:00
parent b2fd274e2c
commit 25fb2453b4
4 changed files with 13 additions and 10 deletions

View file

@ -825,14 +825,14 @@ class FetchArtPlugin(plugins.BeetsPlugin, RequestMixin):
help=u're-download art when already present'
)
cmd.parser.add_option(
u'-m', u'--missing', dest='missing',
u'-q', u'--quiet', dest='quiet',
action='store_true', default=False,
help=u'shows only missing art'
help=u'shows only quiet art'
)
def func(lib, opts, args):
self.batch_fetch_art(lib, lib.albums(ui.decargs(args)), opts.force,
opts.missing)
opts.quiet)
cmd.func = func
return [cmd]
@ -872,13 +872,13 @@ class FetchArtPlugin(plugins.BeetsPlugin, RequestMixin):
return out
def batch_fetch_art(self, lib, albums, force, missing):
def batch_fetch_art(self, lib, albums, force, quiet):
"""Fetch album art for each of the albums. This implements the manual
fetchart CLI command.
"""
for album in albums:
if album.artpath and not force and os.path.isfile(album.artpath):
if not missing:
if not quiet:
message = ui.colorize('text_highlight_minor',
u'has album art')
self._log.info(u'{0}: {1}', album, message)

View file

@ -9,6 +9,9 @@ New features:
* :doc:`/plugins/lyrics`: The plugin can now produce reStructuredText files
for beautiful, readable books of lyrics. Thanks to :user:`anarcat`.
:bug:`2628`
* :doc:`/plugins/fetchart`: The plugin has now a quiet switch that will only
display missing album arts. Thanks to :user:`euri10`.
:bug:`2683`
Fixes:

View file

@ -109,13 +109,13 @@ be processed; otherwise, the command processes every album in your library.
Display Only Missing Album Art
------------------------------
Use the ``fetchart`` command with the ``-m`` switch in order to display only missing
Use the ``fetchart`` command with the ``-q`` switch in order to display only missing
art::
$ beet fetchart [-m] [query]
$ beet fetchart [-q] [query]
By default the command will display all results, the ``-m`` or ``--missing``
switch will only display results for those album arts that still miss.
By default the command will display all results, the ``-q`` or ``--quiet``
switch will only display results for album arts that are still missing.
Image Resizing
--------------

View file

@ -519,7 +519,7 @@ class ArtImporterTest(UseThePlugin):
self._fetch_art(True)
util.remove(self.album.artpath)
self.plugin.batch_fetch_art(self.lib, self.lib.albums(), force=False,
missing=False)
quiet=False)
self.assertExists(self.album.artpath)