Skip to content

Bulk asynchronous downloader for multiple file hosts

Update hash_client.py

Jacobb8ae7c40c747
diff --git a/cyberdrop_dl/clients/hash_client.py b/cyberdrop_dl/clients/hash_client.py
index 629387d7b..dcc68f5a5 100644
--- a/cyberdrop_dl/clients/hash_client.py
+++ b/cyberdrop_dl/clients/hash_client.py
@@ -66,7 +66,7 @@ class HashClient:
else:
await self.manager.progress_manager.hash_progress.add_prev_hash()
await self.manager.db_manager.hash_table.insert_or_update_hash_db(hash
- , file, original_filename, refer)
+ , file, original_filename, refer)
except Exception as e:
await log(f"Error hashing {file} : {e}", 40)
self.hashes[key] = hash
@@ -76,7 +76,7 @@ class HashClient:
try:
if self.manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['hash_while_downloading']:
await self.hash_item(media_item.complete_file, media_item.original_filename, media_item.referer
- )
+ )
except Exception as e:
await log(f"After hash processing failed: {media_item.complete_file} with error {e}", 40)
@@ -97,7 +97,7 @@ class HashClient:
# Get all matches from the database
all_matches = list(map(lambda x: pathlib.Path(x[0], x[1]),
- await self.manager.db_manager.hash_table.get_files_with_hash_matches(hash,
+ await self.manager.db_manager.hash_table.get_files_with_hash_matches(hash,
size)))
# Filter out files with the same path as any file in other_files
@@ -174,7 +174,7 @@ class HashClient:
if selected_file:
size_dict[size] = {'selected': selected_file,
- 'others': list(map(lambda x: str(x.absolute()), files))}
+ 'others': list(map(lambda x: str(x.absolute()), files))}
else:
del size_dict[size]
return hashes_dict