Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix issue with inserting new hashes
datawhoresc0d41800441b
diff --git a/cyberdrop_dl/clients/hash_client.py b/cyberdrop_dl/clients/hash_client.pyindex fb0c71079..c086f534e 100644--- a/cyberdrop_dl/clients/hash_client.py+++ b/cyberdrop_dl/clients/hash_client.py@@ -56,8 +56,6 @@ class HashClient:async def hash_item(self, file, original_filename, refer):key = self._get_key_from_file(file)file = pathlib.Path(file)- refer = str(refer)- original_filename = str(original_filename)if not file.is_file():returnelif self.hashes[key]:diff --git a/cyberdrop_dl/utils/database/tables/hash_table.py b/cyberdrop_dl/utils/database/tables/hash_table.pyindex 18ead5527..a6f52ae4d 100644--- a/cyberdrop_dl/utils/database/tables/hash_table.py+++ b/cyberdrop_dl/utils/database/tables/hash_table.py@@ -110,12 +110,13 @@ class HashTable:Returns:True if the record was inserted or updated successfully, False otherwise."""-+ referer = str(referer) if referer else referercursor = await self.db_conn.cursor()full_path = pathlib.Path(file).absolute()file_size = full_path.stat().st_sizedownload_filename = full_path.name+ original_filename=referer or download_filenamefolder = str(full_path.parent)# Assuming a table named 'file_info' with columns: id (primary key), hash, size, filename, folder