convert: embed into destination file, not source file

Paging @yagebu: I think the old version of the code would embed album art into
the wrong file. Please correct me (and accept my apologies) if I'm wrong
though.
This commit is contained in:
Adrian Sampson 2012-10-24 15:17:00 -07:00
parent dcb9ad7373
commit 02fd9bf809

View file

@ -86,7 +86,6 @@ def convert_item(lib, dest_dir):
if item.format == 'MP3' and item.bitrate < 1000 * conf['max_bitrate']:
log.info(u'Copying {0}'.format(util.displayable_path(item.path)))
util.copy(item.path, dest)
dest_item = library.Item.from_path(dest)
else:
encode(item.path, dest)
item.path = dest
@ -94,7 +93,7 @@ def convert_item(lib, dest_dir):
artpath = lib.get_album(item).artpath
if artpath and conf['embed']:
_embed(artpath, [item])
_embed(artpath, [library.Item.from_path(dest)])
def convert_func(lib, config, opts, args):