Despotify: Fix crash when spotify_track is None
This commit is contained in:
parent
b6b6db6f99
commit
196b3d24a2
@ -123,7 +123,7 @@ class DespotifyTranslator(object):
|
||||
|
||||
@classmethod
|
||||
def to_mopidy_track(cls, spotify_track):
|
||||
if not spotify_track.has_meta_data():
|
||||
if spotify_track is None or not spotify_track.has_meta_data():
|
||||
return None
|
||||
if dt.MINYEAR <= int(spotify_track.year) <= dt.MAXYEAR:
|
||||
date = dt.date(spotify_track.year, 1, 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user