Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark tracks that we can only preview #124

Open
kingosticks opened this issue Apr 6, 2021 · 2 comments
Open

Mark tracks that we can only preview #124

kingosticks opened this issue Apr 6, 2021 · 2 comments

Comments

@kingosticks
Copy link
Member

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.

@Laurentww
Copy link
Contributor

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

@kingosticks
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants