mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-16 21:15:37 +00:00
add sync of rating key from plex server
This commit is contained in:
parent
12a6875af9
commit
1a13d98cd2
@ -518,6 +518,27 @@ if __name__ == '__main__':
|
|||||||
for user in plexTo:
|
for user in plexTo:
|
||||||
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