diff --git a/mopidy/backends/despotify.py b/mopidy/backends/despotify.py index 85f5abee..dc786d64 100644 --- a/mopidy/backends/despotify.py +++ b/mopidy/backends/despotify.py @@ -38,8 +38,9 @@ class DespotifyLibraryController(BaseLibraryController): def search(self, type, what): query = u'%s:%s' % (type, what) result = self.backend.spotify.search(query.encode(ENCODING)) - if result is not None: - return self.backend.translate.to_mopidy_playlist(result.playlist) + if result is None: + return Playlist() + return self.backend.translate.to_mopidy_playlist(result.playlist) class DespotifyPlaybackController(BasePlaybackController):