Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)
MIT License
1.62k stars 106 forks source link

PLexTraktSync not syncing Watched items from Trakt to Plex #2000

Closed iEdgir01 closed 4 months ago

iEdgir01 commented 4 months ago

Confirmation

The problem

I have PlexTraktSync setup to Sync and Watch as needed. I also have been scrobbling to Trakt from netflix via a browser extension.

when the sync runs, the watched items marked on Trakt do not copy over to Plex.

for example, I am on S1E8 of SPY x Family, Plex reports that I am on S1E4, and I have to manually mark as watched in plex for my watchlist to keep in sync with Trakt.

Steps to reproduce the behavior

  1. run plextraktsync
  2. expect watched shows to be updated in plex
  3. google until i decide to create a github report

Error trace / logs

2024-06-24 18:24:11,059 INFO[plextraktsync.commands.sync]:Sync Movie sections: ['Movies']
2024-06-24 18:24:11,066 INFO[plextraktsync.commands.sync]:Sync Show sections: ['Anime', 'Cartoons', 'TV Shows']
2024-06-24 18:24:11,149 INFO[plextraktsync.sync.plugin.SyncPluginManager]:Enable sync plugin 'AddCollectionPlugin': True
2024-06-24 18:24:11,154 INFO[plextraktsync.sync.plugin.SyncPluginManager]:Enable sync plugin 'ClearCollectedPlugin': False
2024-06-24 18:24:11,155 INFO[plextraktsync.sync.plugin.SyncPluginManager]:Enable sync plugin 'LikedListsPlugin': True
2024-06-24 18:24:11,158 INFO[plextraktsync.sync.plugin.SyncPluginManager]:Enable sync plugin 'SyncRatingsPlugin': True
2024-06-24 18:24:11,160 INFO[plextraktsync.sync.plugin.SyncPluginManager]:Enable sync plugin 'SyncWatchedPlugin': True
2024-06-24 18:24:11,163 INFO[plextraktsync.sync.plugin.SyncPluginManager]:Enable sync plugin 'TraktListsPlugin': True
2024-06-24 18:24:11,166 INFO[plextraktsync.sync.plugin.SyncPluginManager]:Enable sync plugin 'WatchListPlugin': True
2024-06-24 18:24:13,814 INFO[plextraktsync.sync.plugin.SyncPluginManager]:Enable sync plugin 'WatchProgressPlugin': True
2024-06-24 18:24:14,149 WARNING[plextraktsync.sync.TraktListsPlugin]:Disabling TraktListsPlugin: No lists to process
2024-06-24 18:24:18,643 INFO[plextraktsync.decorators.measure_time]:Movies processed in 4.49 seconds
2024-06-24 18:24:18,645 INFO[plextraktsync.plan.Walker]:Preload shows data
2024-06-24 18:24:19,509 INFO[plextraktsync.decorators.measure_time]:Anime processed in 861 milliseconds and 872 microseconds
2024-06-24 18:24:20,484 INFO[plextraktsync.decorators.measure_time]:Cartoons processed in 971 milliseconds and 55 microseconds
2024-06-24 18:24:21,803 INFO[plextraktsync.decorators.measure_time]:TV Shows processed in 1.32 seconds
2024-06-24 18:24:21,805 INFO[plextraktsync.plan.Walker]:Preloaded shows data (25 shows)
2024-06-24 18:24:21,806 INFO[plextraktsync.plan.Walker]:Preload shows matches
2024-06-24 18:24:21,907 INFO[plextraktsync.plan.Walker]:Preloaded shows matches (25 shows)
2024-06-24 18:24:22,787 INFO[plextraktsync.decorators.measure_time]:Anime processed in 878 milliseconds and 394 microseconds
2024-06-24 18:24:28,727 INFO[plextraktsync.decorators.measure_time]:Cartoons processed in 5.94 seconds
2024-06-24 18:24:33,725 INFO[plextraktsync.sync.WatchProgressPlugin]:It's Always Sunny in Philadelphia/s01e04/Charlie Has Cancer (2005): Set watch progress to 73.07%: 0:16:33.999000 -> 0:16:33.999000
2024-06-24 18:24:36,267 INFO[plextraktsync.sync.WatchProgressPlugin]:Mummies Alive/s01e01/The Gunslinger Mummy (2015): Set watch progress to 0.69%: 0:00:00 -> 0:00:18.999000
2024-06-24 18:24:36,856 INFO[plextraktsync.sync.WatchProgressPlugin]:Solar Opposites/s03e01/The Extremity Triangulator (2022): Set watch progress to 97.64%: 0:00:00 -> 0:23:08
2024-06-24 18:24:37,352 INFO[plextraktsync.sync.SyncWatchedPlugin]:Marking as watched in Trakt: Solar Opposites/s03e01/The Extremity Triangulator (2022)
2024-06-24 18:24:38,083 INFO[plextraktsync.sync.WatchProgressPlugin]:Victoria/s01e01/Doll No 123 (2016): Set watch progress to 36.95%: 0:25:49.998000 -> 0:25:49.998000
2024-06-24 18:24:38,622 INFO[plextraktsync.decorators.measure_time]:TV Shows processed in 9.89 seconds
2024-06-24 18:24:53,444 INFO[plextraktsync.plex.PlexServerConnection]:Connecting with url: https://192-168-88-221.7306af83d9234d6c9e6b5969e42efe95.plex.direct:32400, timeout 30 seconds
2024-06-24 18:24:59,110 ERROR[plextraktsync.plex.PlexApi]:Harry Potter: Searching Plex Discover error: (400) bad_request; https://discover.provider.plex.tv/library/search?query=Harry+Potter&limit=30&searchTypes=tv&includeMetadata=1 {"Error":{"error":"Bad Request","message":"Missing required param searchProviders!","statusCode":400}}
2024-06-24 18:24:59,116 INFO[plextraktsync.sync.WatchListPlugin]:Skipping Harry Potter (None) from Trakt watchlist because not found in Plex Discover
2024-06-24 18:24:59,442 ERROR[plextraktsync.plex.PlexApi]:Harry Potter: Wizards of Baking: Searching Plex Discover error: (400) bad_request; https://discover.provider.plex.tv/library/search?query=Harry+Potter%3A+Wizards+of+Baking&limit=30&searchTypes=tv&includeMetadata=1 {"Error":{"error":"Bad Request","message":"Missing required param searchProviders!","statusCode":400}}
2024-06-24 18:24:59,448 INFO[plextraktsync.sync.WatchListPlugin]:Skipping Harry Potter: Wizards of Baking (None) from Trakt watchlist because not found in Plex Discover
2024-06-24 18:24:59,462 INFO[plextraktsync.decorators.measure_time]:Updated watchlist in 20.84 seconds
2024-06-24 18:25:02,871 INFO[plextraktsync.decorators.measure_time]:Completed full sync in 52.97 seconds
2024-06-24 18:28:40,504 ERROR[plextraktsync.watch.EventDispatcher]:ConnectionError was raised: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2024-06-24 18:30:10,006 INFO[plextraktsync.watch.WatchStateUpdater]:on_activity: <tmdb:3725690:Episode:232:Solar-Opposites-s03e01>: Collected: True, Watched: [Plex: True, Trakt: True]
2024-06-24 18:30:15,290 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: <Episode:232:Solar-Opposites-s03e01>: 97.644571%, State: playing, Played: True, LastViewed: 2024-06-24 18:24:37
2024-06-24 18:30:17,419 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: <Episode:232:Solar-Opposites-s03e01>: 97.785269%, State: playing, Played: True, LastViewed: 2024-06-24 18:24:37
2024-06-24 18:30:20,496 WARNING[plextraktsync.decorators.retry]:Bad Response - Response could not be parsed for plextraktsync.queue.TraktScrobbleWorker.scrobble(), retrying after 1 seconds (try: 1/5)
2024-06-24 18:30:23,778 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: <Episode:232:Solar-Opposites-s03e01>: 98.277713%, State: stopped, Played: True, LastViewed: 2024-06-24 18:24:37
2024-06-24 18:30:29,125 ERROR[plextraktsync.queue.TraktScrobbleWorker]:Conflict - resource already created

Expected behavior

I may be wrong but I expect the sync to also update what has been watched from Trakt to Plex, not just watched progress.

Inspect of problematic items

No response

Workarounds

No response

Config file contents

trakt_to_plex:
    liked_lists: true
    ratings: true
    watched_status: true
    # If trakt_to_plex watchlist=false and plex_to_trakt watchlist=true
    # the Trakt watchlist will be overwritten by Plex watchlist
    watchlist: true
    # If you prefer to fetch trakt watchlist as a playlist instead of
    # plex watchlist, toggle this to true (is read only if watchlist=true)
    watchlist_as_playlist: false
    # Sync Play Progress from Trakt to Plex
    playback_status: true

Install method

pipx

Version

0.31.3

Python Version

3.12.4

Plex Server Version

1.40.3.8555

Operating System and Version

Ubuntu 24.04 LTS

iEdgir01 commented 4 months ago

Found this after I opened this. https://github.com/Taxel/PlexTraktSync/discussions/1876

I guess i just need to wait for this to come out of development.

issue reopened just to see what others may have to say regarding this.

glensc commented 4 months ago

Unclear what are you reporting here and why shared unrelated logs

iEdgir01 commented 4 months ago

I am trying to sync watched items from Trakt to Plex. The episodes I am trying to sync are not on Plex. e.g. I watch a show on netflix, netflix scrobbles to Trakt as watched, I want Trakt to then update Plex that the item is watched. the show is in my plex watchlist.

glensc commented 4 months ago

The episodes I am trying to sync are not on Plex.

duplicate: https://github.com/Taxel/PlexTraktSync/issues/1142

glensc commented 4 months ago

There's a difference:

Syncing with plex cloud is not implemented