Skip to content

Bulk asynchronous downloader for multiple file hosts

try and except

datawhorescb9e402ad6f8
diff --git a/cyberdrop_dl/clients/hash_client.py b/cyberdrop_dl/clients/hash_client.py
index 79e5edcb6..cbc2c85e2 100644
--- a/cyberdrop_dl/clients/hash_client.py
+++ b/cyberdrop_dl/clients/hash_client.py
@@ -69,9 +69,13 @@ class HashClient:
# first compare downloads to each other
for item in self.manager.path_manager.completed_downloads:
hash=await self.hash_item(item)
- size=item.stat().st_size
- if hash:
- hashes_dict[hash][size].append(item)
+ try:
+ size=item.stat().st_size
+ if hash:
+ hashes_dict[hash][size].append(item)
+ except Exception as e:
+ await log(f"After hash processing failed: {item} with error {e}", 40)
+
with self.manager.live_manager.get_remove_file_via_hash_live() :
# #remove downloaded files, so each group only has the first downloaded file
for size_dict in hashes_dict.values():