From 2d2d88f58cc37c1831f06e7de78d141e4f1e1f44 Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Tue, 25 Jun 2019 10:50:21 -0400 Subject: [PATCH] check if rating key is episode or movie and is watched. if not, kill script --- utility/sync_watch_status.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utility/sync_watch_status.py b/utility/sync_watch_status.py index 1691366..fcfabd4 100644 --- a/utility/sync_watch_status.py +++ b/utility/sync_watch_status.py @@ -527,10 +527,11 @@ if __name__ == '__main__': print("Request manually triggered to update watch status") watchedFrom = check_users_access(plex_access, userFrom, serverFrom) watched_item = watchedFrom.fetchItem(opts.ratingKey) - if not watched_item.isWatched: - print("Rating Key {} was not reported as watched in Plex for user {}".format(opts.ratingKey, - userFrom)) - exit() + if watched_item.type in ["episode", "movie"]: + if not watched_item.isWatched: + print("Rating Key {} was not reported as watched in Plex for user {}".format(opts.ratingKey, + userFrom)) + exit() for user, server_name in opts.userTo: # Check access and connect