Load config.default.yml instead of config.default.json
MODIFY
plextraktsync/config.py
plextraktsync/config.py
@@ -102,10 +102,15 @@ def __contains__(self, item):
return dict.__contains__(self, item)
def initialize(self):
+ """
+ Config load order:
+ - load config.defaults.yml
+ - if config.yml present, load and merge it
+ """
self.initialized = True
loader = ConfigLoader()
- defaults = loader.load_json(default_config_file)
+ defaults = loader.load(default_config_file)
self.update(defaults)
if not exists(self.config_file):

MODIFY
plextraktsync/path.py
plextraktsync/path.py
@@ -15,7 +15,7 @@ def __init__(self):
self.ensure_dir(self.log_dir)
self.ensure_dir(self.cache_dir)
- self.default_config_file = join(self.module_path, "config.default.json")
+ self.default_config_file = join(self.module_path, "config.default.yml")
self.config_file = join(self.config_dir, "config.json")
self.config_yml = join(self.config_dir, "config.yml")
self.pytrakt_file = join(self.config_dir, ".pytrakt.json")

Load config.default.yml instead of config.default.json