Open colinnuk opened 9 years ago
I'm thinking that this also exposes a problem on the mopidy side, it doesn't seem to handle empty "Track()" objects like it should.
Changing soundcloud.py's "get_tracks()" to return None (below) fixes the main issue I see - that of unavailable tracks appearing in the queue.
def get_track(self, track_id, streamable=False):
logger.debug('Getting info for track with id %s' % track_id)
try:
return self.parse_track(self._get('tracks/%s.json' % track_id),
streamable)
except Exception:
logger.info('Song %s was removed' % track_id)
return None
It seems the call to get liked tracks from a SoundCloud account still returns tracks which have been removed, but the subsequent request to get the proper track details from the given Soundcloud URI then fails. Eg, in my "liked" tracks I get the below JSON track returned:
However the actual URI (https://api.soundcloud.com/tracks/70225661?client_id=....) returns a 404 error.
This doesn't then play nicely with the musicbox_webclient software as the Queue page appears empty due to an undefined entry in the returned array to the client!