From 918f0e3547fb3ddabea6dfc190098dd0f4db4645 Mon Sep 17 00:00:00 2001 From: Nathan Thomas Date: Fri, 21 Jan 2022 19:34:08 -0800 Subject: [PATCH] Tidy ups --- rip/core.py | 3 --- streamrip/clients.py | 3 +-- streamrip/downloadtools.py | 8 +++++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rip/core.py b/rip/core.py index 0a53807..dd33652 100644 --- a/rip/core.py +++ b/rip/core.py @@ -174,9 +174,6 @@ class RipCore(list): for source, url_type, item_id in parsed: if item_id in self.db: - logger.info( - f"ID {item_id} already downloaded, use --ignore-db to override." - ) secho( f"ID {item_id} already downloaded, use --ignore-db to override.", fg="magenta", diff --git a/streamrip/clients.py b/streamrip/clients.py index ad25dec..6353022 100644 --- a/streamrip/clients.py +++ b/streamrip/clients.py @@ -1,4 +1,4 @@ -"""The clients that interact with the service APIs.""" +"""The clients that interact with the streaming service APIs.""" import base64 import binascii @@ -116,7 +116,6 @@ class QobuzClient(Client): :type pwd: str :param kwargs: app_id: str, secrets: list, return_secrets: bool """ - # TODO: make this faster secho(f"Logging into {self.source}", fg="green") email: str = kwargs["email"] pwd: str = kwargs["pwd"] diff --git a/streamrip/downloadtools.py b/streamrip/downloadtools.py index 60aa08b..b059c53 100644 --- a/streamrip/downloadtools.py +++ b/streamrip/downloadtools.py @@ -184,9 +184,11 @@ class DownloadPool: filename = await self.getfn(url) logger.debug("Downloading %s", url) async with session.get(url) as response, aiofiles.open(filename, "wb") as f: - # without aiofiles 3.6632679780000004s - # with aiofiles 2.504482839s - await f.write(await response.content.read()) + # without aiofiles 3.6632679780000004s + # with aiofiles 2.504482839s + content = await response.content.read() + print(content) + await f.write(content) if self.callback: self.callback()