You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ncmpcpp as client. When navigating to Browse, [soundcloud], [stream], less than 10 songs appear in the list.
The (undocumented) API seems to have changed.
The problem seems to be in this function:
defget_user_stream(self):
# User timeline like playlist which uses undocumented api# https://api.soundcloud.com/e1/me/stream.json?offset=0# returns five elements per requesttracks= []
forsidinxrange(0, 2):
stream=self._get('e1/me/stream.json?offset=%s'%sid*5)
fordatainstream.get('collection'):
kind=data.get('type')
# multiple types of track with same dataif'track'inkind:
tracks.append(self.parse_track(data.get('track')))
ifkind=='playlist':
playlist=data.get('playlist').get('tracks')
ifisinstance(playlist, collections.Iterable):
tracks.extend(self.parse_results(playlist))
returnself.sanitize_tracks(tracks)
The offset parameter of the API call seems not to have an effect anymore.
The following works for me:
defget_user_stream(self):
# User timeline like playlist which uses undocumented api# https://api.soundcloud.com/e1/me/stream.json?limit=100tracks= []
stream=self._get('e1/me/stream.json?limit=100')
fordatainstream.get('collection'):
kind=data.get('type')
# multiple types of track with same dataif'track'inkind:
tracks.append(self.parse_track(data.get('track')))
ifkind=='playlist':
playlist_id=data.get('playlist').get('id')
fortrackinself.get_set(playlist_id):
tracks.append(self.parse_track(track))
returnself.sanitize_tracks(tracks)
The text was updated successfully, but these errors were encountered:
baumgartnerniels
added a commit
to baumgartnerniels/mopidy-soundcloud
that referenced
this issue
Mar 2, 2015
I'm using ncmpcpp as client. When navigating to Browse, [soundcloud], [stream], less than 10 songs appear in the list.
The (undocumented) API seems to have changed.
The problem seems to be in this function:
The offset parameter of the API call seems not to have an effect anymore.
The following works for me:
The text was updated successfully, but these errors were encountered: