From 514151e69b9beac35ab0c1e936a7068c5e8cf319 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Wed, 5 Feb 2020 10:08:38 -0500 Subject: [PATCH] correct issue when using ratingKey with Plex to Plex Issue reported in Plex forums. --- utility/sync_watch_status.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utility/sync_watch_status.py b/utility/sync_watch_status.py index e4e19b6..bdeee41 100644 --- a/utility/sync_watch_status.py +++ b/utility/sync_watch_status.py @@ -540,7 +540,7 @@ if __name__ == '__main__': if userFrom != "Tautulli": print("Request manually triggered to update watch status") watchedFrom = check_users_access(plex_access, userFrom, serverFrom) - watched_item = watchedFrom.fetchItem(opts.ratingKey) + watched_item = watchedFrom.fetchItem(int(opts.ratingKey)) if not watched_item.isWatched: print("Rating Key {} was not reported as watched in Plex for user {}".format(opts.ratingKey, userFrom)) @@ -555,7 +555,8 @@ if __name__ == '__main__': for user in plexTo: username, server = user - sync_watch_status([watched_item], watched_item.libraryName, server, username) + library = server.library.sectionByID(watched_item.librarySectionID) + sync_watch_status([watched_item], library.title, server, username) else: print("You aren't using this script correctly... bye!")