mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-18 17:25:22 -04:00
Better output
Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
parent
5cd3913976
commit
2b68b96204
2 changed files with 6 additions and 4 deletions
|
@ -122,7 +122,7 @@ class QobuzClient(Client):
|
|||
return
|
||||
|
||||
if (kwargs.get("app_id") or kwargs.get("secrets")) in (None, [], ""):
|
||||
click.secho("Fetching tokens, this may take a few seconds.")
|
||||
click.secho("Fetching tokens — this may take a few seconds.", fg='magenta')
|
||||
logger.info("Fetching tokens from Qobuz")
|
||||
spoofer = Spoofer()
|
||||
kwargs["app_id"] = spoofer.get_app_id()
|
||||
|
|
|
@ -265,9 +265,11 @@ class Track(Media):
|
|||
if self.client.source in ("qobuz", "tidal", "deezer"):
|
||||
assert isinstance(dl_info, dict)
|
||||
logger.debug("Downloadable URL found: %s", dl_info.get("url"))
|
||||
tqdm_download(
|
||||
dl_info["url"], self.path, desc=self._progress_desc
|
||||
) # downloads file
|
||||
try:
|
||||
download_url = dl_info["url"]
|
||||
except KeyError as e:
|
||||
click.secho(f"Panic: {e} dl_info = {dl_info}", fg="red")
|
||||
tqdm_download(download_url, self.path, desc=self._progress_desc)
|
||||
|
||||
elif self.client.source == "soundcloud":
|
||||
assert isinstance(dl_info, dict) # for typing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue