Skip to content

Bulk asynchronous downloader for multiple file hosts

add an update for download_filename into db.

Jules-WinnfieldX9390ffa9e41d
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index c5f802483..d60702c2c 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "5.0.68"
+__version__ = "5.0.69"
diff --git a/cyberdrop_dl/utils/database/tables/history_table.py b/cyberdrop_dl/utils/database/tables/history_table.py
index 81b44b93c..4a0716958 100644
--- a/cyberdrop_dl/utils/database/tables/history_table.py
+++ b/cyberdrop_dl/utils/database/tables/history_table.py
@@ -51,6 +51,7 @@ class HistoryTable:
url_path = await get_db_path(media_item.url, str(media_item.referer))
download_filename = media_item.download_filename if isinstance(media_item.download_filename, str) else ""
await self.db_conn.execute("""INSERT OR IGNORE INTO media (domain, url_path, referer, download_path, download_filename, original_filename, completed) VALUES (?, ?, ?, ?, ?, ?, ?)""", (domain, url_path, str(media_item.referer), str(media_item.download_folder), download_filename, media_item.original_filename, 0))
+ await self.db_conn.execute("""UPDATE media SET download_filename = ? WHERE domain = ? and url_path = ?""", (download_filename, domain, url_path))
await self.db_conn.commit()
async def mark_complete(self, domain: str, media_item: MediaItem) -> None:
diff --git a/pyproject.toml b/pyproject.toml
index 8e2c543e6..97524ffc9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
-version = "5.0.68"
+version = "5.0.69"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"