Fix usage of embedart by convert plugin

Instanciation of EmbedCovertArtPlugin on the fly: there may be several
instances → problem with the listeners it registers?
This commit is contained in:
Bruno Cauet 2015-01-06 21:05:59 +01:00
parent 30562024d2
commit f504c78681

View file

@ -23,7 +23,7 @@ from string import Template
from beets import ui, util, plugins, config
from beets.plugins import BeetsPlugin
from beetsplug.embedart import embed_item
from beetsplug.embedart import EmbedCoverArtPlugin
from beets.util.confit import ConfigTypeError
_fs_lock = threading.Lock()
@ -283,7 +283,8 @@ class ConvertPlugin(BeetsPlugin):
if config['convert']['embed']:
album = item.get_album()
if album and album.artpath:
embed_item(item, album.artpath, itempath=converted)
EmbedCoverArtPlugin().embed_item(item, album.artpath,
itempath=converted)
if keep_new:
plugins.send('after_convert', item=item,