This pull request refines the way qBittorrent download states are mapped to unified statuses in the DownloadService. The main improvement is a more comprehensive and accurate mapping of qBittorrent's internal states, along with a better determination of when a download is considered "completed". This should improve consistency and reliability when displaying or processing download queue items.
Improvements to qBittorrent status mapping:
-
Expanded the mapping of qBittorrent states to unified statuses, covering all major states (downloading, paused, queued, seeding, processing, error), and ensuring more accurate representation of the download's progress and activity.
-
Changed the logic for marking a download as "completed": now, completion is determined by both progress being at least 100% and the state being a seeding/uploading state, rather than relying on explicit completed states (which qBittorrent does not provide).
Automated canary build