Update kill_trans_pause.py
This commit is contained in:
parent
738d45c881
commit
e1f2768de6
@ -64,11 +64,11 @@ def kill_stream(sessionId, message):
|
||||
if __name__ == '__main__':
|
||||
response = fetch('status/sessions')
|
||||
|
||||
for s in response['MediaContainer']['Video']:
|
||||
try:
|
||||
try:
|
||||
for s in response['MediaContainer']['Video']:
|
||||
if s['TranscodeSession']['videoDecision'] == 'transcode' and s['User']['title'] not in USER_IGNORE \
|
||||
and s['Player']['state'] == 'paused':
|
||||
print("Killing {}'s stream for pausing a transcode stream of {}".format(s['User']['title'], s['title']))
|
||||
kill_stream(s['Session']['id'], MESSAGE)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user