From 95e7c3c6b706513de81398485aa71f54d2fe4dc0 Mon Sep 17 00:00:00 2001 From: Ichabond Date: Thu, 30 Aug 2012 14:50:41 +0200 Subject: [PATCH] Resolve library import edge case When adding a library, it is possible the single space character (' ') is added as an artist. The Musicbrainz function _do_mb_search is not capable of handling this, and throws a ValueError, as no query is provided. This checks if an artist fits this situation, and continues with the next possible artist. --- headphones/importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headphones/importer.py b/headphones/importer.py index 571360e9..2b7395b1 100644 --- a/headphones/importer.py +++ b/headphones/importer.py @@ -41,7 +41,7 @@ def artistlist_to_mbids(artistlist, forced=False): for artist in artistlist: - if not artist: + if not artist and not (artist == ' '): continue results = mb.findArtist(artist, limit=1)