This commit is contained in:
Patrice 2019-06-06 19:31:53 +02:00
parent a7dc32b970
commit 03742d25cf
1 changed files with 11 additions and 10 deletions

View File

@ -47,17 +47,18 @@ def gen(camera):
######### ###########
def main():
for cam in cams:
t = 1 # seconds a person can leave the room for
t0 = time.time()
time.clock()
elapsed = 0
stream = cam["ip"]
detector = dt.Detector(stream)
music_playing = client_ip = clients[cam["client_id"]]["status"]
client_ip = "http://" + clients[cam["client_id"]]["ip"]
while True:
for cam in cams:
t = 1 # seconds a person can leave the room for
t0 = time.time()
time.clock()
elapsed = 0
stream = cam["ip"]
detector = dt.Detector(stream)
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")