library check

Actually check against the targeted library...
This commit is contained in:
blacktwin 2018-02-14 08:34:10 -05:00 committed by GitHub
parent 44d2082cec
commit 10686c6f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,9 @@ plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=sess)
if __name__ == '__main__':
lib_id = sys.argv[1]
if lib_id not in TARGET_LIBRARIES:
print('Library accessed is allowed.')
exit()
session_key = int(sys.argv[2])
for session in plex.sessions():