| 88 | |
| 89 | |
| 90 | def refresh_section(sectionID): |
| 91 | plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=session) |
| 92 | section = plex.library.sectionByID(sectionID) |
| 93 | section.update() |
| 94 | time.sleep(10) |
| 95 | plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=session) |
| 96 | section = plex.library.sectionByID(sectionID) |
| 97 | while section.refreshing is True: |
| 98 | time.sleep(10) |
| 99 | print("Waiting for library to finish refreshing to continue dance.") |
| 100 | plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=session) |
| 101 | section = plex.library.sectionByID(sectionID) |
| 102 | |
| 103 | |
| 104 | if __name__ == '__main__': |