From: kaliko Date: Mon, 8 Dec 2014 13:27:01 +0000 (+0100) Subject: Deal with unknown artist X-Git-Tag: 0.13.0~21 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=fadd1129df18b9140f08b99682409eba7d912553;p=mpd-sima.git Deal with unknown artist --- diff --git a/sima/lib/track.py b/sima/lib/track.py index cb16856..2874a19 100644 --- a/sima/lib/track.py +++ b/sima/lib/track.py @@ -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