If else
Added else
This commit is contained in:
parent
3913e23804
commit
38fba84fd7
@ -40,17 +40,18 @@ def kill_session():
|
|||||||
if user in USER_IGNORE or media_type == 'track':
|
if user in USER_IGNORE or media_type == 'track':
|
||||||
print('Ignoring {}\'s {} stream.'.format(user, media_type))
|
print('Ignoring {}\'s {} stream.'.format(user, media_type))
|
||||||
pass
|
pass
|
||||||
try:
|
else:
|
||||||
trans_dec = session.transcodeSessions[0].videoDecision
|
try:
|
||||||
if trans_dec == 'transcode':
|
trans_dec = session.transcodeSessions[0].videoDecision
|
||||||
platform = session.players[0].platform
|
if trans_dec == 'transcode':
|
||||||
MESSAGE = DEVICES.get(platform, DEFAULT_REASON)
|
platform = session.players[0].platform
|
||||||
# print(MESSAGE)
|
MESSAGE = DEVICES.get(platform, DEFAULT_REASON)
|
||||||
print('Killing {user}\'s stream for transcoding video on {plat}.'.format(user=user, plat=platform))
|
# print(MESSAGE)
|
||||||
session.stop(reason=MESSAGE)
|
print('Killing {user}\'s stream for transcoding video on {plat}.'.format(user=user, plat=platform))
|
||||||
except IndexError:
|
session.stop(reason=MESSAGE)
|
||||||
# print('{} not transcoding.'.format(user))
|
except IndexError:
|
||||||
pass
|
# print('{} not transcoding.'.format(user))
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user