diff --git a/beets/util/confit.py b/beets/util/confit.py index e5e48ec4a..c9051de53 100644 --- a/beets/util/confit.py +++ b/beets/util/confit.py @@ -1077,16 +1077,21 @@ class StrSeq(Template): return value.split() else: return [value] - else: - try: - value = list(value) - except TypeError: - self.fail('must be a whitespace-separated string or a list', - view, True) - if all(isinstance(x, BASESTRING) for x in value): - return value + + try: + value = list(value) + except TypeError: + self.fail('must be a whitespace-separated string or a list', + view, True) + + def convert(x): + if isinstance(x, unicode): + return x + elif isinstance(x, BASESTRING): + return x.decode('utf8', 'ignore') else: self.fail('must be a list of strings', view, True) + return map(convert, value) class Filename(Template): diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index 632982edc..1474a7b09 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -234,6 +234,7 @@ def art_for_album(album, paths, maxwidth=None, local_only=False): # Local art. cover_names = config['fetchart']['cover_names'].as_str_seq() + cover_names = map(util.bytestring_path, cover_names) cautious = config['fetchart']['cautious'].get(bool) if paths: for path in paths: diff --git a/test/helper.py b/test/helper.py index bfc433528..0688708fd 100644 --- a/test/helper.py +++ b/test/helper.py @@ -253,7 +253,7 @@ class TestHelper(object): values['title'] = values['title'].format(item_count) item = Item(**values) item.add(self.lib) - if not 'path' in values_: + if 'path' not in values_: item['path'] = item.destination() item.store() return item