client og dl (#485)

This commit is contained in:
adi 2024-06-13 10:59:39 -04:00 committed by GitHub
parent 8a08a43ab0
commit 361ec6b2cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -714,11 +714,14 @@ def download_track(client: SoundCloud, track: BasicTrack, playlist_info=None, ex
if track.policy == "BLOCK":
raise SoundCloudException(f"{title} is not available in your location...")
# Get user_id from the client
client_user_id = client.get_me().id if client.auth_token else None
# Downloadable track
filename = None
is_already_downloaded = False
if (
track.downloadable
(track.downloadable or track.user_id == client_user_id)
and not kwargs["onlymp3"]
and not kwargs.get("no_original")
and client.auth_token