This pull request refactors the download workflow in DownloadService.cs to ensure that a download record is created in the database before sending the request to a download client. It also standardizes the return value of the main workflow to always return the generated download ID, and updates the client handler methods to no longer return a value. This improves consistency and makes download tracking more reliable.
Download workflow improvements:
- A new download record is created in the database before sending the request to the download client. This includes generating a download ID and storing relevant metadata. (
listenarr.api/Services/DownloadService.cs, listenarr.api/Services/DownloadService.csR264-R307) - The main workflow method
SendToDownloadClientAsyncnow always returns the generated download ID after the download record is created, regardless of which client handler is used. (listenarr.api/Services/DownloadService.cs, listenarr.api/Services/DownloadService.csR264-R307)
Refactoring of client handler methods:
- All client handler methods (
SendToQBittorrent,SendToTransmission,SendToSABnzbd,SendToNZBGet) are updated to returnTaskinstead ofTask<string>, and no longer return a download ID or client-specific identifier. (listenarr.api/Services/DownloadService.cs, [1] [2] [3] [4] - Removed unnecessary return statements from client handler methods, as...
Automated canary build