From fadd1129df18b9140f08b99682409eba7d912553 Mon Sep 17 00:00:00 2001 From: kaliko Date: Mon, 8 Dec 2014 14:27:01 +0100 Subject: [PATCH] Deal with unknown artist --- sima/lib/track.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5