This commit is contained in:
parent
a7dc32b970
commit
03742d25cf
|
|
@ -47,6 +47,7 @@ def gen(camera):
|
|||
######### ###########
|
||||
|
||||
def main():
|
||||
while True:
|
||||
for cam in cams:
|
||||
t = 1 # seconds a person can leave the room for
|
||||
t0 = time.time()
|
||||
|
|
@ -57,7 +58,7 @@ def main():
|
|||
music_playing = client_ip = clients[cam["client_id"]]["status"]
|
||||
client_ip = "http://" + clients[cam["client_id"]]["ip"]
|
||||
|
||||
while True:
|
||||
|
||||
elapsed = time.time() - t0
|
||||
if elapsed > t and music_playing:
|
||||
r = requests.get(client_ip + "/stop")
|
||||
|
|
|
|||
Loading…
Reference in New Issue