fixed notifications (kinda)

This commit is contained in:
2025-10-11 15:31:31 +02:00
parent b5d944278b
commit e4c50e20df
3 changed files with 8 additions and 11 deletions
+6 -9
View File
@@ -50,17 +50,14 @@ def dlprogress():
def send_notification():
while True:
if state.aria2 is None:
time.sleep(1)
continue
try:
for d in state.aria2.get_downloads():
if d.is_complete:
notification.notify(
title="Download finished",
message=d.name,
timeout=4)
if dlprogress() == 100:
notification.notify(
title="Download finished",
message=f"{d.name} has finished downloading.",
timeout=4
)
except Exception as e:
if state.debug:
print("Notification thread error:", e)