Skip to content

Commit

Permalink
client og dl (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
adithayyil committed Jun 13, 2024
1 parent 8a08a43 commit 361ec6b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scdl/scdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,15 @@ def download_track(client: SoundCloud, track: BasicTrack, playlist_info=None, ex
# Geoblocked track
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
Expand Down

0 comments on commit 361ec6b

Please sign in to comment.