This commit is contained in:
Blacktwin 2019-06-25 10:22:16 -04:00
parent f9e4ce2ff3
commit 12a6875af9

View File

@ -49,7 +49,7 @@ Taultulli > Settings > Notification Agents > New Script > Script Arguments:
- Synced watch statuses from Tautulli {title from library} to {USER2 or USER3}'s account on selected servers. - Synced watch statuses from Tautulli {title from library} to {USER2 or USER3}'s account on selected servers.
sync_watch_status.py --userFrom USER1=Tautulli --userTo USER2=Server1 USER3=Server2 --ratingKey 1234 sync_watch_status.py --userFrom USER1=Tautulli --userTo USER2=Server1 USER3=Server2 --ratingKey 1234
- Synced watch statuse of rating key 1234 from USER1's Tautulli history to {USER2 or USER3}'s account - Synced watch status of rating key 1234 from USER1's Tautulli history to {USER2 or USER3}'s account
on selected servers. on selected servers.
**Rating key must be a movie or episode. Shows and Seasons not support.... yet. **Rating key must be a movie or episode. Shows and Seasons not support.... yet.
""" """
@ -366,7 +366,6 @@ def sync_watch_status(watched, section, accountTo, userTo, same_server=False):
print('Marking watched...') print('Marking watched...')
sectionTo = accountTo.library.section(section) sectionTo = accountTo.library.section(section)
for item in watched: for item in watched:
print(item)
try: try:
if same_server: if same_server:
fetch_check = sectionTo.fetchItem(item.ratingKey) fetch_check = sectionTo.fetchItem(item.ratingKey)
@ -485,13 +484,9 @@ if __name__ == '__main__':
# Check library for watched items # Check library for watched items
sectionFrom = watchedFrom.library.section(_library.title) sectionFrom = watchedFrom.library.section(_library.title)
if _library.type == 'show': if _library.type == 'show':
for show in sectionFrom.all(): watched_lst = sectionFrom.search(libtype='episode', unwatched=False)
for episode in show.episodes():
if episode.isWatched:
watched_lst.append(episode)
else: else:
for item in sectionFrom.search(unwatched=False): watched_lst = sectionFrom.search(unwatched=False)
watched_lst.append(item)
for user in plexTo: for user in plexTo:
username, server = user username, server = user