Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix some issues with inserting hashes
datawhores8ac75cbdaad9
diff --git a/cyberdrop_dl/clients/hash_client.py b/cyberdrop_dl/clients/hash_client.pyindex 88fee99c8..5d1226334 100644--- a/cyberdrop_dl/clients/hash_client.py+++ b/cyberdrop_dl/clients/hash_client.py@@ -26,8 +26,10 @@ class HashClient:await self.hash_item(file)async def hash_item(self,file):+ if not file.is_file():+ returnhash=await self.manager.db_manager.hash_table.get_file_hash_exists(file)- if not hash and file.exists():+ if not hash:hash = await self.manager.hash_manager.hash_file(file)await self.manager.db_manager.hash_table.insert_or_update_hash_db(hash, file.stat().st_size, file)return hash@@ -67,7 +69,7 @@ class HashClient:ele.unlink(missing_ok=True)else:path.unlink(missing_ok=True)- for ele in matches[1:]:+ for ele in matches:ele.unlink(missing_ok=True)