mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 01:49:42 +02:00
temporarily disable notifications because of bug
This commit is contained in:
@@ -50,15 +50,18 @@ def dlprogress():
|
||||
|
||||
def send_notification():
|
||||
while True:
|
||||
if state.aria2 is None:
|
||||
time.sleep(1)
|
||||
continue
|
||||
|
||||
try:
|
||||
downloads = state.aria2.get_downloads()
|
||||
if downloads:
|
||||
for download in downloads:
|
||||
if download.is_complete:
|
||||
# notification.notify("Download Complete"
|
||||
print("yet")
|
||||
time.sleep(5)
|
||||
for d in state.aria2.get_downloads():
|
||||
if d.is_complete:
|
||||
notification.notify(
|
||||
title="Download finished",
|
||||
message=d.name,
|
||||
timeout=4)
|
||||
except Exception as e:
|
||||
if state.debug:
|
||||
print(f"Notification Error: {e}")
|
||||
break
|
||||
print("Notification thread error:", e)
|
||||
time.sleep(5)
|
||||
|
||||
@@ -47,9 +47,9 @@ if __name__ == "__main__":
|
||||
if state.debug:
|
||||
print("Starting Aria2 Server")
|
||||
state.aria2process = run_aria2server()
|
||||
run_thread(threading.Thread(target=send_notification))
|
||||
signal.signal(signal.SIGINT, keyboardinterrupthandler)
|
||||
atexit.register(kill_aria2server)
|
||||
# run_thread(threading.Thread(target=send_notification))
|
||||
if state.debug:
|
||||
print("Launching GUI")
|
||||
run_gui()
|
||||
|
||||
Reference in New Issue
Block a user