Cleanup unused batch argument
MODIFY
plextraktsync/media.py
plextraktsync/media.py
@@ -121,20 +121,20 @@ def is_collected(self):
return collected.is_collected(
self.show_trakt_id, self.season_number, self.episode_number)
- def add_to_collection(self, batch=False):
- self.trakt_api.add_to_collection(self.trakt, self.plex, batch=batch)
+ def add_to_collection(self):
+ self.trakt_api.add_to_collection(self.trakt, self.plex)
def remove_from_collection(self):
self.trakt_api.remove_from_collection(self.trakt)
- def add_to_trakt_watchlist(self, batch=False):
- self.trakt_api.add_to_watchlist(self.trakt, batch=batch)
+ def add_to_trakt_watchlist(self):
+ self.trakt_api.add_to_watchlist(self.trakt)
def add_to_plex_watchlist(self):
self.plex_api.add_to_watchlist(self.plex.item)
- def remove_from_trakt_watchlist(self, batch=False):
- self.trakt_api.remove_from_watchlist(self.trakt, batch=batch)
+ def remove_from_trakt_watchlist(self):
+ self.trakt_api.remove_from_watchlist(self.trakt)
def remove_from_plex_watchlist(self):
self.plex_api.remove_from_watchlist(self.plex.item)

MODIFY
plextraktsync/sync.py
plextraktsync/sync.py
@@ -181,7 +181,7 @@ def sync_collection(self, m: Media, dry_run=False):
logger.info(f"Adding to collection: {m}")
if not dry_run:
- m.add_to_collection(batch=True)
+ m.add_to_collection()
def sync_ratings(self, m: Media, dry_run=False):
if not self.config.sync_ratings:
@@ -239,7 +239,7 @@ def watchlist_sync_item(self, m: Media, dry_run=False):
elif self.config.update_trakt_wl:
logger.info(f"Removing '{m.trakt.title}' from Trakt watchlist")
if not dry_run:
- m.remove_from_trakt_watchlist(batch=True)
+ m.remove_from_trakt_watchlist()
return
if m in self.plex_wl:
@@ -247,7 +247,7 @@ def watchlist_sync_item(self, m: Media, dry_run=False):
if self.config.update_trakt_wl:
logger.info(f"Adding '{m.plex.item.title}' ({m.plex.item.year}) to Trakt watchlist")
if not dry_run:
- m.add_to_trakt_watchlist(batch=True)
+ m.add_to_trakt_watchlist()
else:
logger.info(f"Removing '{m.trakt.title}' ({m.plex.item.year}) from Plex watchlist")
if not dry_run:
@@ -267,7 +267,7 @@ def watchlist_sync_item(self, m: Media, dry_run=False):
else:
logger.info(f"Removing '{m.trakt.title}' from Trakt watchlist")
if not dry_run:
- m.remove_from_trakt_watchlist(batch=True)
+ m.remove_from_trakt_watchlist()
def sync_watchlist(self, walker: Walker, dry_run=False):
# NOTE: Plex watchlist sync removes matching items from trakt lists

MODIFY
plextraktsync/trakt/TraktApi.py
plextraktsync/trakt/TraktApi.py
@@ -168,7 +168,7 @@ def mark_watched(self, m, time, show_trakt_id=None):
else:
raise RuntimeError(f"mark_watched: Unsupported media type: {m.media_type}")
- def add_to_collection(self, m, pm: PlexLibraryItem, batch=False):
+ def add_to_collection(self, m, pm: PlexLibraryItem):
if m.media_type == "movies":
item = dict(
title=m.title,
@@ -183,7 +183,7 @@ def add_to_collection(self, m, pm: PlexLibraryItem, batch=False):
self.queue.add_to_collection((m.media_type, item))
- def add_to_watchlist(self, m, batch=False):
+ def add_to_watchlist(self, m):
if m.media_type in ["movies", "shows"]:
item = dict(
title=m.title,
@@ -195,7 +195,7 @@ def add_to_watchlist(self, m, batch=False):
self.queue.add_to_watchlist((m.media_type, item))
- def remove_from_watchlist(self, m, batch=False):
+ def remove_from_watchlist(self, m):
if m.media_type in ["movies", "shows"]:
item = dict(
title=m.title,

Cleanup unused batch argument