fix add issue

This commit is contained in:
2025-11-02 15:42:51 +01:00
parent 5c88572ac7
commit 5c4bd3d7e8
4 changed files with 95 additions and 17 deletions

View File

@@ -90,12 +90,21 @@ class DownloadService:
self._download_speeds: deque[float] = deque(maxlen=10)
# Subscribe to SeriesApp download events for progress tracking
# Note: Events library uses assignment (=), not += operator
if hasattr(anime_service, '_app') and hasattr(
anime_service._app, 'download_status'
):
anime_service._app.download_status += (
self._on_seriesapp_download_status
)
# Save existing handler if any, and chain them
existing_handler = anime_service._app.download_status
if existing_handler:
def chained_handler(args):
existing_handler(args)
self._on_seriesapp_download_status(args)
anime_service._app.download_status = chained_handler
else:
anime_service._app.download_status = (
self._on_seriesapp_download_status
)
# Load persisted queue
self._load_queue()