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

Movie / Episode already marked as played on Trakt won't get scrobbled a second time via Sync

zeroquinc opened this issue · comments

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if identical issue already exists
  • I have tried downgrading to find version that can be used as a workaround

The problem

I have the issue that whenever I run the sync command when a movie or episode is already watched on Trakt, it won't mark it as watched a second time, it just skips it. It work's fine on movies or episodes that are not watched yet on Trakt, scrobbling via the watch comand also works fine and adds a second play. It's just the sync command that won't add a second play to Trakt.

Error trace / logs

I first watched a movie that was already played once on my Trakt profile, then played a episode I've never seen before. The movie gets skipped while the episode gets marked as watched.

2023-07-27 23:51:04,212 INFO[PlexTraktSync]:PlexTraktSync [0.26.8]
2023-07-27 23:51:04,521 INFO[PlexTraktSync]:Sync Movie sections: ['Movies']
2023-07-27 23:51:04,524 INFO[PlexTraktSync]:Sync Show sections: ['TV Shows']
2023-07-27 23:51:05,925 INFO[PlexTraktSync]:Movies processed in 1.4 seconds
2023-07-27 23:51:11,911 INFO[PlexTraktSync]:Marking as watched in Trakt: Futurama/s06e18/The Silence of the Clamps (2011)
2023-07-27 23:51:20,754 INFO[PlexTraktSync]:TV Shows processed in 14.8 seconds
2023-07-27 23:51:20,962 INFO[PlexTraktSync]:Completed full sync in 16.5 seconds

Expected behavior

I expect it to mark the movie or episode as played a second time on Trakt.

Steps to reproduce the behavior

  1. Watch a movie that has already been scrobbled / played once on Trakt.
  2. Run sync
  3. Notice it doesn't add a second play to it.

Inspect of problematic items

No response

Workarounds

No response

Install method

docker-compose

Config file contents

cache:
  path: $PTS_CACHE_DIR/trakt_cache

excluded-libraries:
  - Private
  - Family Holidays

config:
  dotenv_override: true

plex:
  timeout: 30

logging:
  append: true
  # Whether to show timestamps in console messages
  console_time: false
  debug: false
  filename: plextraktsync.log
  # Additional logger names to apply filtering
  filter_loggers:
#    - plexapi
#    - requests_cache.backends
#    - requests_cache.backends.base
#    - requests_cache.backends.sqlite
#    - requests_cache.policy.actions
#    - requests_cache.session
#    - trakt.core
#    - urllib3.connectionpool
  filter:
#    # Filter out all messages with level WARNING
#    - level: WARNING
#    # Filter out message with level WARNING and containing a text
#    - level: WARNING
#      message: "not found on Trakt"
#    - message: "because provider local has no external Id"
#    - message: "because provider none has no external Id"
#    - message: "Retry using search for specific Plex Episode"
#    # Filter out messages by requests_cache
#    - name: requests_cache.backends
#    - name: requests_cache.backends.base
#    - name: requests_cache.backends.sqlite
#    - name: requests_cache.policy.actions
#    - name: requests_cache.session

# settings for 'sync' command (default)
sync:
  plex_to_trakt:
    collection: true
    # Clear collected state of items not present in Plex
    clear_collected: false
    ratings: true
    watched_status: true
    # If plex_to_trakt watchlist=false and trakt_to_plex watchlist=true
    # the Plex watchlist will be overwritten by Trakt watchlist
    watchlist: false
  trakt_to_plex:
    liked_lists: false
    ratings: true
    watched_status: false
    # If trakt_to_plex watchlist=false and plex_to_trakt watchlist=true
    # the Trakt watchlist will be overwritten by Plex watchlist
    watchlist: false
    # 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

# settings for 'watch' command
watch:
  add_collection: false
  remove_collection: false
  # what video watched percentage (0 to 100) triggers the watched status
  scrobble_threshold: 80
  # true to scrobble only what's watched by you, false for all your PMS users
  username_filter: true
  # Show the progress bar of played media in terminal
  media_progressbar: false
xbmc-providers:
  movies: imdb
  shows: tvdb

##### Advanced settings below this line, don't edit unless you know what you're doing #####
#http_cache:
  # https://requests-cache.readthedocs.io/en/main/user_guide/expiration.html#url-patterns
  # https://requests-cache.readthedocs.io/en/main/user_guide/expiration.html#expiration-values
  #
  # The value is seconds to cache.
  # Or one of the following special values:
  # - DO_NOT_CACHE: Skip both reading from and writing to the cache
  # - EXPIRE_IMMEDIATELY: Consider the response already expired, but potentially usable
  # - NEVER_EXPIRE: Store responses indefinitely
  #
  # The value can be also suffixed with a time unit:
  # - 5m, 1h, 3d
  # See full documentation at:
  # - https://github.com/wroberts/pytimeparse#pytimeparse-time-expression-parser
  #
  # NOTE: If there is more than one match, the first match will be used in the order they are defined
#  policy:
#    "*.trakt.tv/users/me": 1d
#    "*.trakt.tv/users/likes/lists": DO_NOT_CACHE

# vim:ts=2:sw=2:et

Version

0.26.8

Python Version

Latest

Operating System and Version

Ubuntu 22.04

That's normal for the sync command. It just make watched status being the same on Plex and Trakt.

If you want to add a new watch in trakt, you should use the watch command. It will scrobble in real time to trakt API, and trakt automatically mark as watched when watched threshold is reached (threshold = ~80% of movie duration I think).

But I have the sync from Trakt to Plex off, so its "unwatched" on my Plex. I thought it would add a second play then but this is intended? I delete my media after I've seen it.

Workflow:

  • Watched a movie a year ago, that scrobbled to Trakt and marked as played.
  • Deleted the movie
  • Decided after a year to rewatch it again, download the movie and it's "unplayed" in Plex.
  • Sync skips because it probably already finds that the movie is marked as played on Trakt.

I would've thought it would just add a second play because on Plex it's unwatched and the Trakt to Plex sync is off.

I thought it would add a second play then but this is intended?

What command is "it" ?
sync doesn't add a second play.
watch does.

I would've thought it would just add a second play because on Plex it's unwatched and the Trakt to Plex sync is off.

Same question.

With "it" i mean sync. I don't want to run watch but rather have a sync every 6 hours. But I understand it doesn't add a second play, which is a shame for my use case.

why new issue again? the same feature requested multiple times. and answer is always the same: sync doesn't do second plays. watch does.