From 2ec6bff388ec151b01a153058ba44e5362357d23 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 7 Apr 2016 17:37:53 +0200 Subject: [PATCH] Update playstate if owner plays for single user PMS --- resources/lib/librarysync.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index a0b41b44..d8d104a8 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -1370,9 +1370,16 @@ class LibrarySync(Thread): # Identify the user - same one as signed on with PKC? # Skip update if neither session's username nor userid match # (Owner sometime's returns id '1', not always) - if not (currSess['userId'] == utils.window('currUserId') - or - currSess['username'] == utils.window('plex_username')): + if (utils.window('plex_token') == '' and + currSess['userId'] == '1'): + # PKC not signed in to plex.tv. Plus owner of PMS is + # playing (the '1'). + # Hence must be us (since several users require plex.tv + # token for PKC) + pass + elif not (currSess['userId'] == utils.window('currUserId') + or + currSess['username'] == utils.window('plex_username')): self.logMsg('Our username %s, userid %s did not match the ' 'session username %s with userid %s' % (utils.window('plex_username'),