mirror of
https://github.com/beetbox/beets.git
synced 2026-02-21 14:56:02 +01:00
parent
6d38d9faf4
commit
69b7d1f160
2 changed files with 6 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue