add syncing rating key from plex to plex
This commit is contained in:
parent
165e851cbc
commit
740dc498e2
@ -538,5 +538,26 @@ if __name__ == '__main__':
|
|||||||
username, server = user
|
username, server = user
|
||||||
sync_watch_status([watched_item], watched_item.libraryName, server, username)
|
sync_watch_status([watched_item], watched_item.libraryName, server, username)
|
||||||
|
|
||||||
|
elif opts.ratingKey and serverFrom != "Tautulli":
|
||||||
|
plexTo = []
|
||||||
|
watched_item = []
|
||||||
|
|
||||||
|
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)
|
||||||
|
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
|
||||||
|
plexTo.append([user, check_users_access(plex_access, user, server_name, libraries)])
|
||||||
|
|
||||||
|
for user in plexTo:
|
||||||
|
username, server = user
|
||||||
|
sync_watch_status([watched_item], watched_item.libraryName, server, username)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("You aren't using this script correctly... bye!")
|
print("You aren't using this script correctly... bye!")
|
||||||
|
Loading…
Reference in New Issue
Block a user