From f504c7868107c43fbddfbf636cebb7b5759468e0 Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Tue, 6 Jan 2015 21:05:59 +0100 Subject: [PATCH] Fix usage of embedart by convert plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instanciation of EmbedCovertArtPlugin on the fly: there may be several instances → problem with the listeners it registers? --- beetsplug/convert.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beetsplug/convert.py b/beetsplug/convert.py index 0e7838148..76694cc12 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -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,