mopidy-soundcloud icon indicating copy to clipboard operation
mopidy-soundcloud copied to clipboard

Mark tracks that we can only preview

Open kingosticks opened this issue 5 years ago • 2 comments

Some tracks require a "SoundCloud Go+" subscription to play so may only offer a short preview. We should change their title (or something) to identify these and allow the user to avoid them.

kingosticks avatar Apr 06 '21 14:04 kingosticks

After some testing, the following observations:

  • API calls for SoundCloud GO tracks are only possible through API-v2.
  • Current application client id does not work with API-v2 (403 forbidden).
  • SoundCloud has disabled obtaining new application client ids, so getting one which works with API-v2 is not an option at the moment.

For most purposes (read: streaming public music), there should be no issue. However, switching calls to two APIs does look a bit silly.

On a positive note; API-v2 "tracks/{track_id}" calls return a json with the progressive and hls streams, so no scraping has to be done to get the stream url while working around the 429 error.

One possibility is to add the preview identification string to the album name, like so?: https://github.com/Laurentww/mopidy-soundcloud/blob/6dc32da91f22b3f48b9bf6933f8186e4dc788032/mopidy_soundcloud/soundcloud.py#L414-L416

Laurentww avatar Apr 12 '21 22:04 Laurentww

They've made some more API updates which will help with this: issue https://developers.soundcloud.com/blog/high-tier-content-in-the-soundcloud-api

kingosticks avatar Jul 21 '21 16:07 kingosticks