From 4e989592e2178b803f321f61ae87e4d30447ded1 Mon Sep 17 00:00:00 2001 From: Nick Steel Date: Sat, 30 Apr 2022 23:23:16 +0100 Subject: [PATCH] Remove client id from requests following SC uath changes. This workaround (fix?) was reported in #123 --- mopidy_soundcloud/soundcloud.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mopidy_soundcloud/soundcloud.py b/mopidy_soundcloud/soundcloud.py index 0b79451..ee0ab46 100644 --- a/mopidy_soundcloud/soundcloud.py +++ b/mopidy_soundcloud/soundcloud.py @@ -148,8 +148,6 @@ def send(self, request, **kwargs): class SoundCloudClient: - CLIENT_ID = "93e33e327fd8a9b77becd179652272e2" - public_client_id = None def __init__(self, config): @@ -285,7 +283,7 @@ def resolve_url(self, uri): def _get(self, url, limit=None): url = f"https://api.soundcloud.com/{url}" - params = [("client_id", self.CLIENT_ID)] + params = [] if limit: params.insert(0, ("limit", self.explore_songs)) try: @@ -429,7 +427,7 @@ def get_streamable_url(self, sharing, permalink_url, stream_url): ) # ~quickly yields rate limit errors - req = self.http_client.head(f"{stream_url}?client_id={self.CLIENT_ID}") + req = self.http_client.head(stream_url) if req.status_code == 302: return req.headers.get("Location", None) elif req.status_code == 429: