Skip to content

Bulk asynchronous downloader for multiple file hosts

fix bug in sql_helper where >1 row was allowed in corner case.

Jules-WinnfieldXe8531e402e93
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index 94c66d6c4..a9b924d5c 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "4.1.23"
+__version__ = "4.1.24"
diff --git a/cyberdrop_dl/base_functions/sql_helper.py b/cyberdrop_dl/base_functions/sql_helper.py
index acc996657..2500cc5f0 100644
--- a/cyberdrop_dl/base_functions/sql_helper.py
+++ b/cyberdrop_dl/base_functions/sql_helper.py
@@ -245,7 +245,14 @@ class SQLHelper:
sql_res = self.curs.fetchall()
for row in sql_res:
if row[7] == 1:
- complete_row = row
+ if complete_row:
+ if row[6] == original_filename:
+ await self._remove_entry(url_path, complete_row[6])
+ complete_row = row
+ else:
+ await self._remove_entry(url_path, row[6])
+ else:
+ complete_row = row
else:
if len(sql_res) < 2:
await self._update_row_original_filename(url_path, original_filename)