Add new properties to SyncConfig
Add sync_watchlists SyncConfig property
Add update_plex_wl SyncConfig property
Add update_plex_wl_as_pl SyncConfig property
Add update_trakt_wl SyncConfig property
Add sync_wl SyncConfig property
Add need_library_walk SyncConfig property
MODIFY
plextraktsync/sync.py
plextraktsync/sync.py
@@ -45,12 +45,42 @@ def plex_to_trakt(self):
def sync_ratings(self):
return self.trakt_to_plex["ratings"] or self.plex_to_trakt["ratings"]
+ @cached_property
+ def sync_watchlists(self):
+ return self.trakt_to_plex["watchlist"] or self.plex_to_trakt["watchlist"]
+
@cached_property
def sync_watched_status(self):
return (
self.trakt_to_plex["watched_status"] or self.plex_to_trakt["watched_status"]
)
+ @cached_property
+ def update_plex_wl(self):
+ return self.trakt_to_plex["watchlist"] and not self.trakt_to_plex["watchlist_as_playlist"]
+
+ @cached_property
+ def update_plex_wl_as_pl(self):
+ return self.trakt_to_plex["watchlist"] and self.trakt_to_plex["watchlist_as_playlist"]
+
+ @cached_property
+ def update_trakt_wl(self):
+ return self.plex_to_trakt["watchlist"]
+
+ @cached_property
+ def sync_wl(self):
+ return self.trakt_to_plex["watchlist"] or self.plex_to_trakt["watchlist"]
+
+ @cached_property
+ def need_library_walk(self):
+ return any([
+ self.update_plex_wl_as_pl,
+ self.sync_watched_status,
+ self.sync_ratings,
+ self.plex_to_trakt["collection"],
+ self.trakt_to_plex["liked_lists"],
+ ])
+
class Sync:
def __init__(self, config: Config, plex: PlexApi, trakt: TraktApi):

Add new properties to SyncConfig

- Add sync_watchlists SyncConfig property
- Add update_plex_wl SyncConfig property
- Add update_plex_wl_as_pl SyncConfig property
- Add update_trakt_wl SyncConfig property
- Add sync_wl SyncConfig property
- Add need_library_walk SyncConfig property