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

"username_filter" Doesn't work for main user on account.

Jo-Dan 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 run plextraktsync from a docker compose. I run it in "watch" mode and it works fine for the most part, but whenever one of my managed users watches something it is also synced. I use the main "admin" account as my own account, and different friends and family are set up as managed users.
I have username_filter: true in my yaml file and have tried redoing the initial setup where the user is selected, but managed users' views are still being added to my trakt. Is there anything I am missing here setup wise or is this a bug?

Steps to reproduce the behavior

  1. Setup main admin user as user for plextraktsync
  2. set username_filter: true under watch in config.yaml
  3. Have plextraktsync running in watch mode
  4. have a managed user watch something
  5. Check trakt to see managed users content in your own watched history

Error trace / logs

No response

Expected behavior

Only the main user watch data to be synced or "Scrobbled"

Inspect of problematic items

No response

Workarounds

I've had this issue for over a year so as far as I am aware no old versions solve the problem.

Config file contents

No response

Install method

docker-compose

Version

0.30.2

Python Version

3.12.3

Plex Server Version

1.40.2.8395-c67dce28e

Operating System and Version

Ubuntu 20.04

Works here. I guess you have to tinker source code yourself to debug the problem.

for example:

--- a/plextraktsync/watch/WatchStateUpdater.py
+++ b/plextraktsync/watch/WatchStateUpdater.py
@@ -157,6 +157,7 @@ def on_delete(self, event: TimelineEntry):
 
     def on_play(self, event: PlaySessionStateNotification):
         if not self.can_scrobble(event):
+            self.logger.warning(f"on_play: Rejected event {event}")
             return
 
         m = self.find_by_key(event.key)
@@ -181,6 +182,7 @@ def can_scrobble(self, event: PlaySessionStateNotification):
         if not self.username_filter:
             return True
 
+        self.logger.warning(f"session user: {self.sessions[event.session_key]}")
         return self.sessions[event.session_key] == self.username_filter
 
     def scrobble(self, m: Media, percent: float, event: PlaySessionStateNotification):

also, is your PLEX_USERNAME email or login? try one or another.

User disappeared. Closing.

Sorry, I was waiting for other users to watch stuff and lost track. Have tried PLEX_USERNAME as both username and email, no difference in behaviour.

You can switch user yourself (that's how I tested), are you talking about managed accounts, or totally different accounts?

And you can re-open issue if you plan trying to troubleshoot this. as from practice most users come, report something and then just disappear. not much motivating thing for a maintainer.