Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Numerous Duplicate marking as Played on Plex Media Server

gbooker opened this issue · comments

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if identical issue already exists

The problem

Plex developer here:

In diagnosing a problem with Plex Media Server and the View State Sync service on plex.tv, we have noticed that several users of PlexTraktSync are having issues where several movies are being marked as played either every 1 or 2 hour. Other entries in the PMS logs indicate that this is the frequency of which PlexTraktSync is run against the server.

Note: I do not know the user's installation methods/OS/version as I am looking at the media server's logs when I noticed the problem.

Error trace / logs

From the PMS logs (IP/Username/Servername obfuscated):

Sep 14, 2022 17:00:10.376 [0x7fc7cbc82b00] DEBUG - Request: [IP:Port (Subnet)] GET /:/scrobble?key=48038&identifier=com.plexapp.plugins.library (5 live) #d81d2 TLS GZIP Signed-in Token (Username) (Server)
Sep 14, 2022 17:00:10.377 [0x7fc7cbc82b00] DEBUG - [Req#d81d2] Library item 48038 'The Tinder Swindler' got played by account 1!
Sep 14, 2022 17:00:10.377 [0x7fc7d150db00] DEBUG - Completed: [IP:Port] 200 GET /:/scrobble?key=48038&identifier=com.plexapp.plugins.library (5 live) TLS GZIP 1ms 195 bytes (pipelined: 11)

Same request occurs every hour as far back as the logs go.

Expected behavior

PlexTraktSync should not record an items as played which is already played.

Steps to reproduce the behavior

Unsure of how this circumstance is occurring but we have several users who are using PlexTraktSync which are having the same set of movies repeatedly being marked as played.

Inspect of problematic items

No response

Workarounds

We are telling user to try disabling PlexTraktSync and the items being repeatedly being marked as played ceases.

Install method

pipx (Recommended)

Version

Unknown

Python Version

Unknown

Operating System and Version

Unknown

Can we get more info from the users :

  • version of the script
  • which set of movies (why not all)
  • a debug trace of a problematic sync
  • an inspect command run on a problematic movie
  • test of clear cache
  • test of downgrade script

I don't have the info from users but we did ask them if they could provide info to this GHI.
In the mean time, a possible thought occurred to me. One of the users PMS logs show a client marking 3 movies as played (every 2 hours). One of them had a guid of plex://… but the other two had the old style guids (which is a bit odd).
I wonder, what if the user has two copies of a movie (say in different library sections):

Movie metadata id guid watched?
My Great Movie (2000) 1234 plex://abcd No
My Great Movie (2000) 2345 com.plexapp.agents.imdb://tt1234 Yes

Is PlexTraktSync able to differentiate these? As in, if this movie is played on Trakt, might PlexTraktSync attempt to mark the second (metadata id 2345) as played instead of the first?

Is PlexTraktSync able to differentiate these?

Yes, each one is processed separately.

This issue is duplicate of :

which were fixed in version 0.18.0
We need to know which version users are running.

It seems to be related to wrong match movie with old agent and PTS cache.

The problem is that if a sync is run with a wrong match, the PTS cache will keep this wrong information after the Fix match.
A temporary fix is to clear PlexTraktSync cache (remove file trakt_cache.sqlite) if a sync already occured with a wrong matched movie that you fixed match.

Steps :
1. Fix match movies in Plex
2. Upgrade movies libraries to use Plex Movie agent (as recommended in our doc)
3. Remove PlexTraktSync cache

@gbooker any news ?

We did find that some users were encountering the scenario as you described above which was causing numerous duplicate watch events.

Though this is quite an issue as it causes duplicate events and is doing so silently to the user. Our view state sync is making this much more visible to the point where among duplicate watch events PlexTraktSync is one of the primary causes (if not the only primary cause).

Unable to reproduce with current version.
This issue will be closed if you don't fulfill informations requested in first answer.