Update kill_trans_pause.py

This commit is contained in:
KurtzPT 2018-02-06 16:58:32 +00:00 committed by GitHub
parent 7e560ffd9f
commit 168ea61824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,12 +38,12 @@ def kill_session(sess_key):
state = session.players[0].state
if session.transcodeSessions:
trans_dec = session.transcodeSessions[0].videoDecision
if session.sessionKey is sess_key and state == 'paused' and trans_dec == 'transcode':
if session.sessionKey == sess_key and state == 'paused' and trans_dec == 'transcode':
title = (session.grandparentTitle + ' - ' if session.type == 'episode' else '') + session.title
print('Killing {user}\'s stream for pausing a transcode stream of {title}.'.format(user=user, title=title))
session.stop(reason=MESSAGE)
if __name__ == '__main__':
session_key = sys.argv[1]
session_key = int(sys.argv[1])
kill_session(session_key)