]> kaliko git repositories - mpd-sima.git/commitdiff
Deal with unknown artist
authorkaliko <kaliko@azylum.org>
Mon, 8 Dec 2014 13:27:01 +0000 (14:27 +0100)
committerkaliko <kaliko@azylum.org>
Mon, 8 Dec 2014 13:27:01 +0000 (14:27 +0100)
sima/lib/track.py

index cb168566ab190580b94db3546a96d43becc8bbb6..2874a192ad59497161b7698db3cbabd5d088aab2 100644 (file)
@@ -129,6 +129,11 @@ class Track:
     @property
     def Artist(self):
         """Get artist object from track"""
+        if not self.artist:
+            if not self.musicbrainz_artistid:
+                return Artist(name='[unknown]',
+                              mbid='125ec42a-7229-4250-afc5-e057484327fe')
+            return Artist(name='[unknown]', **self.__dict__)
         return Artist(**self.__dict__)
 
 # VIM MODLINE