diff --git a/beetsplug/embedart.py b/beetsplug/embedart.py index 00a6ad969..d4d0fe4af 100644 --- a/beetsplug/embedart.py +++ b/beetsplug/embedart.py @@ -110,7 +110,7 @@ def album_imported(lib, album): def embed_item(item, imagepath, maxwidth=None, itempath=None, - compare_threshold=0, ifempty=False, asalbum=False): + compare_threshold=0, ifempty=False, as_album=False): """Embed an image into the item's media file. """ if compare_threshold: @@ -126,7 +126,7 @@ def embed_item(item, imagepath, maxwidth=None, itempath=None, displayable_path(imagepath) )) return - if maxwidth and not asalbum: + if maxwidth and not as_album: imagepath = resize_image(imagepath, maxwidth) try: @@ -165,7 +165,7 @@ def embed_album(album, maxwidth=None, quiet=False): for item in album.items(): embed_item(item, imagepath, maxwidth, None, config['embedart']['compare_threshold'].get(int), - config['embedart']['ifempty'].get(bool), asalbum=True) + config['embedart']['ifempty'].get(bool), as_album=True) def resize_image(imagepath, maxwidth): diff --git a/docs/changelog.rst b/docs/changelog.rst index 17c8c0560..1f1221543 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -63,6 +63,9 @@ Fixes: interpreted correctly. And WMA (ASF) files now map the ``comments`` field to the "Description" tag (in addition to "WM/Comments"). Thanks to Matthias Kiefer. :bug:`1043` +* :doc:`/plugins/embedart`: Avoid resizing the image multiple times when + embedding into an album. Thanks to :user:`kerobaros`. :bug:`1028`, + :bug:`1036` 1.3.8 (September 17, 2014)