Rename config.json to config.json.bak after migration
MODIFY
plextraktsync/config.py
plextraktsync/config.py
@@ -145,6 +145,12 @@ def initialize(self):
if exists(self.config_file) and not exists(self.config_yml):
config = loader.load(self.config_file)
loader.write(self.config_yml, config)
+
+ # Rename, so users would not mistakenly edit outdated file
+ config_bak = f"{self.config_file}.old"
+ from plextraktsync.logging import logger
+ logger.warning(f"Renaming {self.config_file} to {config_bak}")
+ loader.rename(self.config_file, config_bak)
else:
if not exists(self.config_yml):
loader.copy(default_config_file, self.config_yml)

Rename config.json to config.json.bak after migration