diff --git a/server.py b/server.py index 06c23e5..5facdf2 100644 --- a/server.py +++ b/server.py @@ -187,7 +187,7 @@ def stop_all_videos(): # terminate a parent process and all its child processes using a specified signal. -def kill_child_processes(parent_pid, sig=signal.SIGKILL): +def kill_child_processes(parent_pid, sig=signal.SIGILL): try: parent = psutil.Process(parent_pid) parent.send_signal(sig) @@ -412,7 +412,7 @@ async def state(): @app.post("/play/file") -async def play_file(file_path: str = "cache", title: str = None, thumbnail: str = None): +async def play_file(file_path: str = "cache", title: str = None, thumbnail: str = None, loop: bool = False): try: # check if we are going to play all videos or a single video in the cache @@ -427,7 +427,7 @@ async def play_file(file_path: str = "cache", title: str = None, thumbnail: str args=( file_path, State.PLAYING, - False, + loop, title, thumbnail, ), diff --git a/static/cache.html b/static/cache.html index 4c9234a..cb6d0ca 100644 --- a/static/cache.html +++ b/static/cache.html @@ -17,11 +17,14 @@