1
0
Fork 0
rozštěpen z encrypt/random

aggiunti messaggi

Tento commit je obsažen v:
encrypt 2020-04-16 21:47:39 +02:00
rodič 194c36ee76
revize 15c5fffb08

Zobrazit soubor

@ -15,9 +15,11 @@ def message_received(message):
if command == "/start":
is_streaming = True
silence_time = 0
mumble.my_channel().send_text_message("Diretta iniziata")
mumble.users.myself.recording()
elif command == "/stop":
is_streaming = False
mumble.my_channel().send_text_message("Diretta terminata")
mumble.users.myself.unrecording()
parser = argparse.ArgumentParser(description='Regia pienamente automatizzata')
@ -95,8 +97,9 @@ while mumble.is_alive():
silence_time += RESOLUTION
sys.stdout.buffer.write(silent)
if auto_suspend_stream and (silence_time >= silence_limit_ms):
if auto_suspend_stream and (silence_time >= silence_limit_ms) and is_streaming:
is_streaming = False
mumble.my_channel().send_text_message("Diretta terminata in automatico dopo "+str(silence_limit)+" secondi circa di silenzio")
mumble.users.myself.unrecording()
cursor_time += FLOAT_RESOLUTION