Skip to content

Commit

Permalink
Reset DB test flags on DB change. Fixes #27
Browse files Browse the repository at this point in the history
  • Loading branch information
mizaki committed Aug 10, 2024
1 parent 47cb6c7 commit 037cb8f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gcd_talker/gcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,15 @@ def parse_settings(self, settings: dict[str, Any]) -> dict[str, Any]:
self.currency = settings["gcd_currency"]
self.download_gui_covers = settings["gcd_gui_covers"]
self.download_tag_covers = settings["gcd_tag_covers"]

# Reset DB tests for FTS and index in case of a change to a "clean" DB
old_db_file = self.db_file
self.db_file = settings["gcd_filepath"]
if self.db_file != old_db_file:
self.has_issue_id_type_id_index = False
self.has_fts5 = False
self.has_fts5_checked = False

return settings

def check_status(self, settings: dict[str, Any]) -> tuple[str, bool]:
Expand Down

0 comments on commit 037cb8f

Please sign in to comment.