Skip to content

Commit 51e4e84

Browse files
Cleanup models.py: remove unused db_path and silence warning
1 parent b0067c6 commit 51e4e84

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

CONTRIBUTORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Copyright (C) 2024-2025 Calibre-Web Automated contributors
303303
- zhiyue (1 commits)
304304
# Fork Contributors (crocodilestick/calibre-web-automated)
305305

306-
- crocodilestick (781 commits)
306+
- crocodilestick (782 commits)
307307
- jmarmstrong1207 (73 commits)
308308
- demitrix (30 commits)
309309
- sirwolfgang (29 commits)

cps/progress_syncing/models.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,15 @@ def execute_sql(sql):
8383
return conn.execute(sql)
8484

8585
# Check if 'calibre' database is attached (Calibre-Web architecture)
86+
is_calibre_attached = False
8687
try:
8788
db_list = execute_sql("PRAGMA database_list").fetchall()
8889
# Row format: (seq, name, file)
8990
# Log the database list for debugging
90-
log.info(f"Database list: {[str(row) for row in db_list]}")
91+
log.debug(f"Database list: {[str(row) for row in db_list]}")
9192
is_calibre_attached = any(str(row[1]) == 'calibre' for row in db_list)
9293
except Exception as e:
9394
log.warning(f"Failed to check database list: {e}")
94-
is_calibre_attached = False
95-
96-
if not is_calibre_attached:
97-
log.warning("Calibre database not attached. Creating table in main schema (in-memory?). This may cause persistence issues.")
9895

9996
table_prefix = "calibre." if is_calibre_attached else ""
10097
table_name = f"{table_prefix}book_format_checksums"

0 commit comments

Comments
 (0)