From 2c75d0567ffafe53564dc4b017a2dcaeb93530fc Mon Sep 17 00:00:00 2001 From: Malte Ried Date: Tue, 27 Jan 2015 19:59:49 +0100 Subject: [PATCH] Made the new functionality the default behaviour. --- beetsplug/embedart.py | 13 ++++++------- docs/changelog.rst | 4 ++-- docs/plugins/embedart.rst | 23 ++++++++++++----------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/beetsplug/embedart.py b/beetsplug/embedart.py index 263980b3f..10d3b945d 100644 --- a/beetsplug/embedart.py +++ b/beetsplug/embedart.py @@ -97,8 +97,11 @@ class EmbedCoverArtPlugin(BeetsPlugin): 'with the album') def extract_func(lib, opts, args): - if opts.filename: - filename = opts.filename + if opts.outpath: + self.extract_first(normpath(opts.outpath), + lib.items(decargs(args))) + else: + filename = opts.filename or config['art_filename'].get() if os.path.dirname(filename) != '': self._log.error(u"Only specify a name rather a path for " u"-n") @@ -108,11 +111,7 @@ class EmbedCoverArtPlugin(BeetsPlugin): artpath = self.extract_first(artpath, album.items()) if artpath and opts.associate: album.set_art(artpath) - - else: - outpath = normpath(opts.outpath - or config['art_filename'].get()) - self.extract_first(outpath, lib.items(decargs(args))) + album.store() extract_cmd.func = extract_func # Clear command. diff --git a/docs/changelog.rst b/docs/changelog.rst index e61240165..7041bba13 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -24,11 +24,11 @@ Features: * :doc:`plugins/mbsync`: A new ``-f/--format`` option controls the output format when listing unrecognized items. The output is also now more helpful by default. :bug:`1246` -* :doc:`/plugins/fetchart`: Names of extracted image art is taken from the - ``art_filename`` configuration option. :bug:`1258` * :doc:`/plugins/fetchart`: New option ``-n`` to extract the cover art of all matched albums into its directory. It's also possible to automatically associate them with the album when adding ``-a`` :bug:`1261` +* :doc:`/plugins/fetchart`: Names of extracted image art is taken from the + ``art_filename`` configuration option. :bug:`1258` * :doc:`/plugins/fetchart`: There's a new Wikipedia image source that uses DBpedia to find albums. Thanks to Tom Jaspers. :bug:`1194` diff --git a/docs/plugins/embedart.rst b/docs/plugins/embedart.rst index e556ad90c..cf96c504f 100644 --- a/docs/plugins/embedart.rst +++ b/docs/plugins/embedart.rst @@ -77,18 +77,19 @@ embedded album art: use a specific image file from the filesystem; otherwise, each album embeds its own currently associated album art. -* ``beet extractart [-o FILE] QUERY``: extracts the image from an item matching - the query and stores it in a file. You can specify the destination file using - the ``-o`` option, but leave off the extension: it will be chosen - automatically. The destination filename is specified using the - ``art_filename`` configuration option. It defaults to ``cover`` if it's not - specified via ``-o`` nor the config. - * ``beet extractart [-a] [-n FILE] QUERY``: extracts the images for all albums - matching the query. The images are placed inside the album folder. The - destination filename is taken either from the ``-n`` option. Using ``-a``, - the extracted image files are automatically associated with the corresponding - album. + matching the query. The images are placed inside the album folder. You can + specify the destination file name using the ``-n`` option, but leave off the + extension: it will be chosen automatically. The destination filename is + specified using the ``art_filename`` configuration option. It defaults to + ``cover`` if it's not specified via ``-o`` nor the config. + Using ``-a``, the extracted image files are automatically associated with the + corresponding album. + +* ``beet extractart -o FILE QUERY``: extracts the image from an item matching + the query and stores it in a file. You have to specify the destination file + using the ``-o`` option, but leave off the extension: it will be chosen + automatically. * ``beet clearart QUERY``: removes all embedded images from all items matching the query. (Use with caution!)