Skip to content

Commit

Permalink
Use m.title, m consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jan 9, 2023
1 parent b171e68 commit 65a9160
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions plextraktsync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def sync_collection(self, m: Media, dry_run=False):
if m.is_collected:
return

logger.info(f"Adding to collection: {m}")
logger.info(f"Adding to collection: '{m.title}' {m}")
if not dry_run:
m.add_to_collection(batch=True)

Expand Down Expand Up @@ -235,21 +235,21 @@ def sync_watched(self, m: Media, dry_run=False):
def watchlist_sync_item(self, m: Media, dry_run=False):
if m.plex is None:
if self.config.update_plex_wl:
logger.info(f"Skipping '{m.trakt.title}' ({m.trakt.year}) {m} from Trakt watchlist because not found in Plex Discover")
logger.info(f"Skipping '{m.trakt.title}' {m} from Trakt watchlist because not found in Plex Discover")
elif self.config.update_trakt_wl:
logger.info(f"Removing '{m.trakt.title}' ({m.trakt.year}) {m} from Trakt watchlist")
logger.info(f"Removing '{m.trakt.title}' {m} from Trakt watchlist")
if not dry_run:
m.remove_from_trakt_watchlist(batch=True)
return

if m in self.plex_wl:
if m not in self.trakt_wl:
if self.config.update_trakt_wl:
logger.info(f"Adding '{m.plex.item.title}' ({m.plex.item.year}) {m} to Trakt watchlist")
logger.info(f"Adding '{m.title}' {m} to Trakt watchlist")
if not dry_run:
m.add_to_trakt_watchlist(batch=True)
else:
logger.info(f"Removing '{m.trakt.title}' ({m.plex.item.year}) {m} from Plex watchlist")
logger.info(f"Removing '{m.title}' {m} from Plex watchlist")
if not dry_run:
m.remove_from_plex_watchlist()
else:
Expand All @@ -261,11 +261,11 @@ def watchlist_sync_item(self, m: Media, dry_run=False):
del self.trakt_wl[m]
elif m in self.trakt_wl:
if self.config.update_plex_wl:
logger.info(f"Adding '{m.trakt.title}' to Plex watchlist")
logger.info(f"Adding '{m.title}' {m} to Plex watchlist")
if not dry_run:
m.add_to_plex_watchlist()
else:
logger.info(f"Removing '{m.trakt.title}' from Trakt watchlist")
logger.info(f"Removing '{m.title}' {m} from Trakt watchlist")
if not dry_run:
m.remove_from_trakt_watchlist(batch=True)

Expand Down

0 comments on commit 65a9160

Please sign in to comment.