mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
fixer api thread error spam message for notification
This commit is contained in:
@@ -49,10 +49,9 @@ def dlprogress():
|
||||
return 0
|
||||
|
||||
def send_notification():
|
||||
|
||||
while True:
|
||||
try:
|
||||
for download in state.aria2:
|
||||
for download in state.aria2.get_downloads():
|
||||
if dlprogress() == 100:
|
||||
notification.notify(
|
||||
title = "Download finished",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from dataclasses import dataclass, field
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional, Any, List, Dict
|
||||
from pathlib import Path
|
||||
|
||||
@@ -14,7 +14,7 @@ class AppState:
|
||||
download_path: str = str(Path.home() / "Downloads")
|
||||
speed_limit: int = 0
|
||||
aria2process: Optional[Any] = None
|
||||
aria2: list[Any] = field(default_factory=list)
|
||||
aria2: Any = None
|
||||
aria2_threads: int = 4
|
||||
|
||||
state = AppState(posts=[], post_titles=[], post_urls=[], post_author=[], download_path="")
|
||||
|
||||
Reference in New Issue
Block a user