From d69570ad44940bd68f999080b0fc69330258e4fc Mon Sep 17 00:00:00 2001 From: blacktwin Date: Fri, 26 Jan 2018 10:18:58 -0500 Subject: [PATCH] Update kill_trans_library.py --- killstream/kill_trans_library.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/killstream/kill_trans_library.py b/killstream/kill_trans_library.py index fa58702..707cf53 100644 --- a/killstream/kill_trans_library.py +++ b/killstream/kill_trans_library.py @@ -42,15 +42,15 @@ plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=sess) if __name__ == '__main__': lib_id = sys.argv[1] - session_key = sys.argv[2] + session_key = int(sys.argv[2]) for session in plex.sessions(): username = session.usernames[0] media_type = session.type section_id = session.librarySectionID - if username not in USER_IGNORE and media_type != 'track' and lib_id == section_id and session.sessionKey is session_key: + if username not in USER_IGNORE and media_type != 'track' and lib_id == section_id and session.sessionKey == session_key: title = session.title - if session.transcodeSessions[0]: + if session.transcodeSessions: trans_dec = session.transcodeSessions[0].videoDecision if trans_dec == 'transcode': reason = DEVICES.get(session.players[0].platform, DEFAULT_REASON)