refractor files and improve aria2 process killing, needs improvement

This commit is contained in:
Vxrtrauter
2025-10-11 23:52:25 +02:00
parent 251f9f40de
commit f358d5462f
7 changed files with 31 additions and 19 deletions
+16
View File
@@ -0,0 +1,16 @@
from core.utils.data.state import state
import threading
shutdown_event = threading.Event()
def kill_aria2server():
if state.aria2process:
state.aria2process.kill()
if state.debug:
print("\nKilled Aria2")
def closehelper():
shutdown_event.set()
kill_aria2server()