From 4222b37bc29c540c2ef6ab1a295fe8ab351dc03b Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 14 Dec 2012 12:38:46 -0800 Subject: [PATCH] convert: fix processing singletons w/ "embed" on --- beetsplug/convert.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/beetsplug/convert.py b/beetsplug/convert.py index b9259d2fb..d5a8d51d0 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -73,9 +73,12 @@ def convert_item(lib, dest_dir): item.path = dest item.write() - artpath = lib.get_album(item).artpath - if artpath and conf['embed']: - _embed(artpath, [item]) + if conf['embed']: + album = lib.get_album(item) + if album: + artpath = album.artpath + if artpath: + _embed(artpath, [item]) def convert_func(lib, config, opts, args):