Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
initialize hashclient on download client init to prevent remaking object every time
datawhoresb63709ad7234
diff --git a/cyberdrop_dl/clients/download_client.py b/cyberdrop_dl/clients/download_client.pyindex 70b3714c4..f177be18d 100644--- a/cyberdrop_dl/clients/download_client.py+++ b/cyberdrop_dl/clients/download_client.py@@ -62,6 +62,7 @@ class DownloadClient:self._global_limiter = self.client_manager.global_rate_limiterself.trace_configs = []self._file_path=None+ self._hash_client=HashClient(self.manager)if os.getenv("PYCHARM_HOSTED") is not None:async def on_request_start(session, trace_config_ctx, params):await log(f"Starting download {params.method} request to {params.url}", 40)@@ -190,7 +191,7 @@ class DownloadClient:"""Handle hashing completed items and adds item to the completed list"""self.manager.path_manager.add_completed(media_item)if self.manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['hash_while_downloading']:- await HashClient(self.manager).hash_item(media_item.complete_file)+ await self._hash_client.hash_item(media_item.complete_file)"""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""