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 6, 2024
1 parent 9ab55f0 commit 03b8b57
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plextraktsync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def sync_collection(self, m: Media, dry_run=False):
return

logger.info(f"Adding to collection: {m.title_link}", extra={"markup": True})
# logger.info(f"Adding to collection: '{m.title}' {m}")

if not dry_run:
m.add_to_collection()
Expand Down Expand Up @@ -204,10 +205,10 @@ 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.title_link} from Trakt watchlist because not found in Plex Discover", extra={"markup": True})
# 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.title_link} from Trakt watchlist", extra={"markup": True})
# 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()
return
Expand All @@ -217,6 +218,7 @@ def watchlist_sync_item(self, m: Media, dry_run=False):
if self.config.update_trakt_wl:
logger.info(f"Adding {m.title_link} to Trakt watchlist", extra={"markup": True})
# 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()
else:
Expand All @@ -234,10 +236,13 @@ def watchlist_sync_item(self, m: Media, dry_run=False):
elif m in self.trakt_wl:
if self.config.update_plex_wl:
logger.info(f"Adding {m.title_link} to Plex watchlist", extra={"markup": True})
# 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.title_link} from Trakt watchlist", extra={"markup": True})
# logger.info(f"Removing '{m.title}' {m} from Trakt watchlist")

if not dry_run:
m.remove_from_trakt_watchlist()

Expand Down

0 comments on commit 03b8b57

Please sign in to comment.