Skip to content

Commit

Permalink
Merge pull request #30 from mizaki/db_reset
Browse files Browse the repository at this point in the history
Reset DB test flags on DB change
  • Loading branch information
mizaki authored Aug 10, 2024
2 parents 47cb6c7 + 037cb8f commit e00739b
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 e00739b

Please sign in to comment.