Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch Progress sets to 99.9% causing the media to stay in 'Continue Watching' with 0 seconds remaining #2196

Open
2 of 3 tasks
tomsinclair94 opened this issue Feb 24, 2025 · 0 comments

Comments

@tomsinclair94
Copy link

Confirmation

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

The problem

Recently I have noticed that media is being marked as 99.9% played which is causing the media to remain in the Plex 'Continue Watching' with 0 seconds remaining.

When marking the item in Plex as watched to override and remove it from the list, the next sync run overwrites the media and puts it back to 99.9%.

An example from the log with debug enabled after manually marking the media watched in Plex:

2025-02-24 22:30:01,192 INFO[plextraktsync.sync.WatchProgressPlugin]:Brooklyn Nine-Nine/s08e05/PB&J (2021): Set watch progress to 99.99%: 0:00:00 -> 0:21:19.455000
2025-02-24 22:30:01,194 DEBUG[plexapi]:GET http://<PLEX_IP>:32400/:/progress?key=1615&identifier=com.plexapp.plugins.library&time=1279455&state=stopped
2025-02-24 22:30:01,194 DEBUG[requests_cache.policy.actions]:Cache directives from request headers: CacheDirectives()
2025-02-24 22:30:01,194 DEBUG[requests_cache.policy.expiration]:URL http://<PLEX_IP>:32400/:/progress?key=1615&identifier=com.plexapp.plugins.library&time=1279455&state=stopped matched pattern "*/": 0:10:00
2025-02-24 22:30:01,194 DEBUG[requests_cache.policy.actions]:Pre-read cache checks: Passed
2025-02-24 22:30:01,194 DEBUG[requests_cache.policy.actions]:Post-read cache actions: CacheActions(expire_after=datetime.timedelta(seconds=600))

The Watch scrobbling appears to work though:

  1. It marks it to 100% (If I let the media play until finish).
  2. The next run of the sync then marks the item from 0:00:00 to a value that's 99.9% played.
  3. Subsequence syncs then just keep setting it to 99.9%.

Here is a log example of the scrobble and subsequence syncs showing the above:

2025-02-23 22:48:54,437 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: Episode:1615:Brooklyn-Nine-Nine-s08e05: 99.028401%, State: playing, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-23 22:48:59,436 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: Episode:1615:Brooklyn-Nine-Nine-s08e05: 99.429326%, State: playing, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-23 22:49:04,426 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: Episode:1615:Brooklyn-Nine-Nine-s08e05: 99.817356%, State: playing, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-23 22:49:07,261 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: Episode:1615:Brooklyn-Nine-Nine-s08e05: 99.993357%, State: paused, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-23 22:49:07,971 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: Episode:1615:Brooklyn-Nine-Nine-s08e05: 100.000000%, State: stopped, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-24 00:00:10,239 INFO[plextraktsync.sync.WatchProgressPlugin]:Brooklyn Nine-Nine/s08e05/PB&J (2021): Set watch progress to 99.99%: 0:00:00 -> 0:21:19.455000
2025-02-24 02:00:08,365 INFO[plextraktsync.sync.WatchProgressPlugin]:Brooklyn Nine-Nine/s08e05/PB&J (2021): Set watch progress to 99.99%: 0:21:19.455000 -> 0:21:19.455000

For the time being I have disabled the scrobbler service from running to see if this helps. This didn't always happen and only started fairly recently though. I run auto updates on my machine so likely get a new release within 24h.

I'm unsure where the values are coming from (i.e. 0:00:00 -> 0:21:19.455000).
I assume the first value is what Plex currently states as the play progress and the second value is what it's being set to (but where does that come from?). This might help figure out why the watch status keeps getting changed.

Note: I have seen few other media items that have a very short play time (under 1%) keep getting updated despite Plex having it as 0:00:0:

2025-02-24 23:03:14,554 INFO[plextraktsync.sync.WatchProgressPlugin]:Brooklyn Nine-Nine/s07e11/Valloweaster (2020): Set watch progress to 0.42%: 0:00:00 -> 0:00:05.088000

Steps to reproduce the behavior

There are no steps per say, but details are provided above of what I am seeing

Error trace / logs

2025-02-24 22:30:01,192 INFO[plextraktsync.sync.WatchProgressPlugin]:Brooklyn Nine-Nine/s08e05/PB&J (2021): Set watch progress to 99.99%: 0:00:00 -> 0:21:19.455000
2025-02-24 22:30:01,194 DEBUG[plexapi]:GET http://<PLEX_IP>:32400/:/progress?key=1615&identifier=com.plexapp.plugins.library&time=1279455&state=stopped
2025-02-24 22:30:01,194 DEBUG[requests_cache.policy.actions]:Cache directives from request headers: CacheDirectives()
2025-02-24 22:30:01,194 DEBUG[requests_cache.policy.expiration]:URL http://<PLEX_IP>:32400/:/progress?key=1615&identifier=com.plexapp.plugins.library&time=1279455&state=stopped matched pattern "*/": 0:10:00
2025-02-24 22:30:01,194 DEBUG[requests_cache.policy.actions]:Pre-read cache checks: Passed
2025-02-24 22:30:01,194 DEBUG[requests_cache.policy.actions]:Post-read cache actions: CacheActions(expire_after=datetime.timedelta(seconds=600))




2025-02-23 22:48:54,437 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: <Episode:1615:Brooklyn-Nine-Nine-s08e05>: 99.028401%, State: playing, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-23 22:48:59,436 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: <Episode:1615:Brooklyn-Nine-Nine-s08e05>: 99.429326%, State: playing, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-23 22:49:04,426 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: <Episode:1615:Brooklyn-Nine-Nine-s08e05>: 99.817356%, State: playing, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-23 22:49:07,261 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: <Episode:1615:Brooklyn-Nine-Nine-s08e05>: 99.993357%, State: paused, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-23 22:49:07,971 INFO[plextraktsync.watch.WatchStateUpdater]:on_play: <Episode:1615:Brooklyn-Nine-Nine-s08e05>: 100.000000%, State: stopped, Played: True, LastViewed: 2025-02-23 22:44:54
2025-02-24 00:00:10,239 INFO[plextraktsync.sync.WatchProgressPlugin]:Brooklyn Nine-Nine/s08e05/PB&J (2021): Set watch progress to 99.99%: 0:00:00 -> 0:21:19.455000
2025-02-24 02:00:08,365 INFO[plextraktsync.sync.WatchProgressPlugin]:Brooklyn Nine-Nine/s08e05/PB&J (2021): Set watch progress to 99.99%: 0:21:19.455000 -> 0:21:19.455000

Expected behavior

I expect the scrobbled value of 100% to remain on the media after the next sync, rather than reverting to 99.9%.

Inspect of problematic items


Workarounds

No response

Config file contents

cache:
  path: /root/.cache/PlexTraktSync/trakt_cache
excluded-libraries:
- Private
- Family Holidays
- TV Recordings
config:
  dotenv_override: true
plex:
  timeout: 30
logging:
  append: true
  console_time: false
  debug: false
  filename: plextraktsync.log
  filter_loggers: null
  filter: null
sync:
  rating_priority: plex
  plex_to_trakt:
    collection: true
    clear_collected: false
    ratings: true
    watched_status: true
    watchlist: false
  trakt_to_plex:
    liked_lists: true
    ratings: true
    watched_status: true
    watchlist: true
    watchlist_as_playlist: false
    playback_status: true
liked_lists:
  keep_watched: true
watch:
  add_collection: false
  remove_collection: false
  scrobble_threshold: 80
  username_filter: true
  media_progressbar: true
  ignore_clients: null
xbmc-providers:
  movies: imdb
  shows: tvdb

Install method

pipx

Version

0.34.2

Python Version

3.12.3

Plex Server Version

1.41.4.9463-630c9f557

Operating System and Version

Linux-6.8.0-53-generic-x86_64-with-glibc2.39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant