forked from encrypt/random
aggiunti messaggi
This commit is contained in:
parent
194c36ee76
commit
15c5fffb08
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Laden…
Reference in a new issue