Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix: Hash Table Query Times (#1417)
Jacob44a89801a9e9
diff --git a/cyberdrop_dl/database/tables/definitions.py b/cyberdrop_dl/database/tables/definitions.pyindex 55507e507..a40eedc33 100644--- a/cyberdrop_dl/database/tables/definitions.py+++ b/cyberdrop_dl/database/tables/definitions.py@@ -70,3 +70,7 @@ CREATE TABLE IF NOT EXISTS temp_hash (FOREIGN KEY (folder, download_filename) REFERENCES files(folder, download_filename));"""++create_hash_index = """+CREATE INDEX IF NOT EXISTS idx_hash_type_hash ON hash (hash_type, hash);+"""diff --git a/cyberdrop_dl/database/tables/hash.py b/cyberdrop_dl/database/tables/hash.pyindex 76808b4a8..cc7c7f346 100644--- a/cyberdrop_dl/database/tables/hash.py+++ b/cyberdrop_dl/database/tables/hash.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, castfrom cyberdrop_dl.utils.logger import log-from .definitions import create_files, create_hash+from .definitions import create_files, create_hash, create_hash_indexif TYPE_CHECKING:import aiosqlite@@ -23,9 +23,10 @@ class HashTable:return self._database._db_connasync def startup(self) -> None:- """Startup process for the HistoryTable."""+ """Startup process for the HashTable."""await self.db_conn.execute(create_files)await self.db_conn.execute(create_hash)+ await self.db_conn.execute(create_hash_index)await self.db_conn.commit()async def get_file_hash_exists(self, path: Path | str, hash_type: str) -> str | None: