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

All tracks cannot be streamed #99

Open
thatlittlegit opened this Issue Feb 25, 2018 · 10 comments

Comments

4 participants
@thatlittlegit
Copy link

thatlittlegit commented Feb 25, 2018

I downloaded a copy of the repository and changed the version in __init__.py to 2.0.3 or something, and then installed it via setup.py. However, now when I try to play a song all I get is:

INFO     'Sucker For Pain (Suicide Squad Soundtrack) [Dariioo Trap Remix] - Imagine Dragons' can't be streamed from SoundCloud
WARNING  Track is not playable: soundcloud:song/Sucker For Pain (Suicide Squad Soundtrack) Dariioo Trap Remix - Imagine Dragons.271990006

(using that as an example)

Can anyone help, or figure out what's wrong?

@rahulonmars

This comment has been minimized.

Copy link

rahulonmars commented Mar 16, 2018

This is the exactly same thing happening with me.
No matter which track I play, it says, track is not playable.

@janLo

This comment has been minimized.

Copy link

janLo commented Mar 16, 2018

This happens because SoundCloud puts client based rate limits in place. Because mopidy-soundcloud uses the same client is for all installations the limit is basically constantly exceeded.

@kingosticks

This comment has been minimized.

Copy link
Member

kingosticks commented Mar 16, 2018

For example:

{"errors":[{"meta":{"rate_limit":{"bucket":"by-client","max_nr_of_requests":15000,"time_window":"PT24H","name":"plays"},"remaining_requests":0,"reset_time":"2018/03/16 17:50:52 +0000"}}]}
@kingosticks

This comment has been minimized.

Copy link
Member

kingosticks commented Mar 16, 2018

Also, the client_id is not actually secret so any number of other people might be out there using it. That's down to SoundCloud's stupid API design.

But actually maybe we can potentially improve things. The rate count is supposedly incremented for every request to /tracks/<id>/stream and it seems we do at least two of those for every call to translate_uri. We do one in order to determine if we are allowed to stream the track and then another to get the URL when we actually come to play it. Seems to me we could do both those things at the same time and reduce this down to a single request. Technically I don't think you are meant to cache that redirect but we could try and see.

Potentially the Gstreamer internals might request it a few more times whilst playing, I'm not sure if it caches redirects or not. But if not, maybe we'll get even more of an improvement from this.

@rahulonmars

This comment has been minimized.

Copy link

rahulonmars commented Mar 20, 2018

Is there another way we can solve this ?
Like by registering a new application with soundcloud and giving the app-id in mopidy.

@kingosticks

This comment has been minimized.

Copy link
Member

kingosticks commented Mar 20, 2018

If you look you'll see soundcloud app sign-ups are closed (and have been for some time)

@rahulonmars

This comment has been minimized.

Copy link

rahulonmars commented Mar 20, 2018

Ohh..yeah.

@kingosticks There is another strange issue I'm facing. "No Sound". Before you go all rowdy on me, I've tried installing GStreamer 1.0, still nothing.
Any help is appreciated.

@kingosticks

This comment has been minimized.

Copy link
Member

kingosticks commented Mar 20, 2018

Please post a full description (https://docs.mopidy.com/en/latest/troubleshooting/#show-installed-dependencies) of that separate problem at discuss.mopidy.com. Let's keep this on topic.

@thatlittlegit

This comment has been minimized.

Copy link
Author

thatlittlegit commented Mar 20, 2018

I don't know much about how SoundCloud or mopidy-soundcloud works behind the scenes, but I do know other desktop clients exist for SC. Perhaps we could draw information and techniques from one of them?

It just seems if they can do it, surely we can.

@janLo

This comment has been minimized.

Copy link

janLo commented Mar 20, 2018

@thatlittlegit If you read the comment you will see that there is not much you can do other than register your own client-id (not possible at the moment) or reach out to sc to change their rate-limit-policy from client-id-based to user-based.

kingosticks added a commit to kingosticks/mopidy-soundcloud that referenced this issue Mar 23, 2018

Avoid rate limit by reducing requests to track stream endpoint.
Combine the request for finding if stream is playable with the
request for the actual stream URI. This should help with mopidy#99.

kingosticks added a commit to kingosticks/mopidy-soundcloud that referenced this issue May 22, 2018

Avoid rate limit by reducing requests to track stream endpoint.
Combine the request for finding if stream is playable with the
request for the actual stream URI. This should help with mopidy#99.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.