mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-14 07:04:51 -04:00
Fix soundcloud downloads
This commit is contained in:
parent
bb752a9121
commit
36bbcd5ca1
2 changed files with 8 additions and 3 deletions
|
@ -219,7 +219,7 @@ class Track:
|
|||
return False
|
||||
|
||||
elif self.client.source == "soundcloud":
|
||||
self._soundcloud_download(dl_info, self.path)
|
||||
self._soundcloud_download(dl_info)
|
||||
|
||||
else:
|
||||
raise InvalidSourceError(self.client.source)
|
||||
|
@ -765,7 +765,10 @@ class Tracklist(list):
|
|||
|
||||
else:
|
||||
for item in self:
|
||||
click.secho(f'\nDownloading "{item!s}"', fg="blue")
|
||||
if self.client.source != 'soundcloud':
|
||||
# soundcloud only gets metadata after `target` is called
|
||||
# message will be printed in `target`
|
||||
click.secho(f'\nDownloading "{item!s}"', fg="blue")
|
||||
target(item, **kwargs)
|
||||
|
||||
self.downloaded = True
|
||||
|
|
|
@ -373,7 +373,7 @@ class Playlist(Tracklist):
|
|||
|
||||
elif self.client.source == "soundcloud":
|
||||
self.name = self.meta["title"]
|
||||
self.image = self.meta.get("artwork_url").replace("large", "t500x500")
|
||||
# self.image = self.meta.get("artwork_url").replace("large", "t500x500")
|
||||
self.creator = self.meta["user"]["username"]
|
||||
tracklist = self.meta["tracks"]
|
||||
|
||||
|
@ -415,8 +415,10 @@ class Playlist(Tracklist):
|
|||
self.download_message()
|
||||
|
||||
def _download_item(self, item: Track, **kwargs):
|
||||
kwargs['parent_folder'] = self.folder
|
||||
if self.client.source == "soundcloud":
|
||||
item.load_meta()
|
||||
click.secho(f"Downloading {item!s}", fg='blue')
|
||||
|
||||
if kwargs.get("set_playlist_to_album", False):
|
||||
item["album"] = self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue