removed loop_video()  and return from the last block of wait_for_button_press
master
ezn 1 year ago
parent b14f412cda
commit 412ef5ac7b

@ -169,14 +169,11 @@ def wait_for_button_press(video_info):
handle_video_chain(next_video_id) handle_video_chain(next_video_id)
else: else:
print("No next video available. Restarting from Video 1.") print("No next video available. Restarting from Video 1.")
#########################
#loop_video() # Restart from Video 1
print(f"Restarting service: {service_name}") print(f"Restarting service: {service_name}")
subprocess.run(["sudo", "systemctl", "restart", service_name], c> subprocess.run(["sudo", "systemctl", "restart", service_name], c>
restart_service(service_name) restart_service(service_name)
print(f"Service {service_name} restarted successfully.") print(f"Service {service_name} restarted successfully.")
exit() exit()
return
time.sleep(0.1) time.sleep(0.1)

Loading…
Cancel
Save