mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2025-02-16 13:58:25 +00:00
fix trakt not saving authorization
This commit is contained in:
parent
aa5fbf7fd1
commit
b09f0dc366
3 changed files with 3 additions and 3 deletions
|
@ -124,7 +124,7 @@ class ConfigFile:
|
|||
if "sonarr" in new_config: new_config["sonarr"] = new_config.pop("sonarr")
|
||||
if "trakt" in new_config: new_config["trakt"] = new_config.pop("trakt")
|
||||
if "mal" in new_config: new_config["mal"] = new_config.pop("mal")
|
||||
if not read_only:
|
||||
if not self.read_only:
|
||||
yaml.round_trip_dump(new_config, open(self.config_path, "w", encoding="utf-8"), indent=None, block_seq_indent=2)
|
||||
self.data = new_config
|
||||
except yaml.scanner.ScannerError as e:
|
||||
|
|
|
@ -108,7 +108,7 @@ class MyAnimeList:
|
|||
|
||||
def _save(self, authorization):
|
||||
if authorization is not None and "access_token" in authorization and authorization["access_token"] and self._check(authorization):
|
||||
if self.authorization != authorization and self.config.read_only:
|
||||
if self.authorization != authorization and not self.config.read_only:
|
||||
yaml.YAML().allow_duplicate_keys = True
|
||||
config, ind, bsi = yaml.util.load_yaml_guess_indent(open(self.config_path))
|
||||
config["mal"]["authorization"] = {
|
||||
|
|
|
@ -80,7 +80,7 @@ class Trakt:
|
|||
|
||||
def _save(self, authorization):
|
||||
if authorization and self._check(authorization):
|
||||
if self.authorization != authorization and self.config.read_only:
|
||||
if self.authorization != authorization and not self.config.read_only:
|
||||
yaml.YAML().allow_duplicate_keys = True
|
||||
config, ind, bsi = yaml.util.load_yaml_guess_indent(open(self.config_path))
|
||||
config["trakt"]["authorization"] = {
|
||||
|
|
Loading…
Add table
Reference in a new issue