Skip to content

Commit

Permalink
Add server_config to SyncConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Sep 1, 2023
1 parent b5f88fd commit 6f5a84d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion plextraktsync/config/SyncConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@

if TYPE_CHECKING:
from plextraktsync.config.Config import Config
from plextraktsync.config.PlexServerConfig import PlexServerConfig


class SyncConfig:
def __init__(self, config: Config):
def __init__(self, config: Config, server_config: PlexServerConfig):
self.config = dict(config["sync"])
self.server_config = server_config.sync_config

def __getitem__(self, key):
return self.config[key]
Expand Down
2 changes: 1 addition & 1 deletion plextraktsync/util/Factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def invalidate_plex_cache(key, value):
def sync_config(self):
from plextraktsync.config.SyncConfig import SyncConfig

return SyncConfig(self.config)
return SyncConfig(self.config, self.server_config)

@cached_property
def queue(self):
Expand Down

0 comments on commit 6f5a84d

Please sign in to comment.