Add RunConfig to hold runtime config
MODIFY
plextraktsync/config.py
plextraktsync/config.py
import json
+from dataclasses import dataclass
from json import JSONDecodeError
from os import getenv
from os.path import exists
TRAKT_POST_DELAY = 1.1
+@dataclass
+class RunConfig:
+ """
+ Class to hold runtime config parameters
+ """
+ dry_run: bool = False
+ batch_size: int = 1
+ progressbar: bool = True
+
+ def update(self, **kwargs):
+ for name, value in kwargs.items():
+ self.__setattr__(name, value)
+
+ return self
+
+
class Config(dict):
env_keys = [
"PLEX_BASEURL",

Add RunConfig to hold runtime config