rogerfar / rdt-client

Real-Debrid Client Proxy
MIT License
838 stars 110 forks source link

Cancelled downloads are not deleted #427

Closed X4V1 closed 5 months ago

X4V1 commented 6 months ago

Issue: When I cancel a download from Radarr , it is stopping the download in RDTC but it's not removing the file from the disk ("delete from download client" option selected in Radarr). Version: 2.0.62 Type: Linux Service (Debian 12) Service: AllDebrid Downloader: Internal Downloader Log file: rdtclient.log I cancelled the download of Batman few minutes before 6pm. I don't find the root cause in logs (full log file available above)

2024-02-26 17:51:05.054 +01:00 [DBG] RdtClient.Service.Middleware.RequestLoggingMiddleware: Method: POST, Path: /api/v2/torrents/delete, Form: hashes: 20c36da819ed8c93bfadc403c92e360e844a29c9, deleteFiles: true
2024-02-26 17:51:05.055 +01:00 [DBG] RdtClient.Web.Controllers.QBittorrentController: Delete 20c36da819ed8c93bfadc403c92e360e844a29c9
2024-02-26 17:51:05.055 +01:00 [DBG] RdtClient.Service.Services.QBittorrent: Delete 20c36da819ed8c93bfadc403c92e360e844a29c9
2024-02-26 17:51:05.119 +01:00 [DBG] RdtClient.Service.Services.QBittorrent: Removing torrents from debrid provider and RDT-Client, no files
2024-02-26 17:51:05.167 +01:00 [DBG] RdtClient.Service.Services.Torrents: Deleting for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)
2024-02-26 17:51:05.192 +01:00 [DBG] RdtClient.Service.Services.Torrents: Cancelling download for download Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv. Completed: 1%, avg speed: 4206481bytes/s (6e24a9a9-9471-43b3-9ecc-47bce4777a3a) remoteID: 5e161fa5-18a1-4a11-8142-1326e5bc60f3 for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)
2024-02-26 17:51:05.192 +01:00 [DBG] RdtClient.Service.Services.Downloaders.InternalDownloader: Cancelling download https://c5d6e7.debrid.it/dl/316lsnsc1b9/Batman%20v%20Superman%20L%27Aube%20de%20la%20Justice%202016%20MULTi%20VFF%201080p%20WEB-DL%20AVC%20DD%2B%205.1-QBDom.mkv
2024-02-26 17:51:05.307 +01:00 [DBG] RdtClient.Service.BackgroundServices.TaskRunner: Updating torrent info from debrid provider
2024-02-26 17:51:05.405 +01:00 [DBG] RdtClient.Service.BackgroundServices.TaskRunner: Finished updating torrent info from debrid provider, next update in 10 seconds
2024-02-26 17:51:05.601 +01:00 [DBG] RdtClient.Service.Services.TorrentRunner: Processing 1 completed downloads
2024-02-26 17:51:05.602 +01:00 [DBG] RdtClient.Service.Services.TorrentRunner: Processing download for download Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv. Completed: 0%, avg speed: 0bytes/s (6e24a9a9-9471-43b3-9ecc-47bce4777a3a) remoteID: 5e161fa5-18a1-4a11-8142-1326e5bc60f3 for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)
2024-02-26 17:51:05.602 +01:00 [ERR] RdtClient.Service.Services.TorrentRunner: Download reported an error: The operation was canceled. for download Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv. Completed: 0%, avg speed: 0bytes/s (6e24a9a9-9471-43b3-9ecc-47bce4777a3a) remoteID: 5e161fa5-18a1-4a11-8142-1326e5bc60f3 for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)
2024-02-26 17:51:05.602 +01:00 [DBG] RdtClient.Service.Services.TorrentRunner: Download retry count 0/3, torrent retry count 0/1 for download Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv. Completed: 0%, avg speed: 0bytes/s (6e24a9a9-9471-43b3-9ecc-47bce4777a3a) remoteID: 5e161fa5-18a1-4a11-8142-1326e5bc60f3 for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)
2024-02-26 17:51:05.602 +01:00 [DBG] RdtClient.Service.Services.TorrentRunner: Retrying download for download Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv. Completed: 0%, avg speed: 0bytes/s (6e24a9a9-9471-43b3-9ecc-47bce4777a3a) remoteID: 5e161fa5-18a1-4a11-8142-1326e5bc60f3 for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)
2024-02-26 17:51:05.624 +01:00 [DBG] RdtClient.Service.Services.TorrentRunner: Removed from ActiveDownloadClients for download Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv. Completed: 0%, avg speed: 0bytes/s (6e24a9a9-9471-43b3-9ecc-47bce4777a3a) remoteID: 5e161fa5-18a1-4a11-8142-1326e5bc60f3 for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)
2024-02-26 17:51:05.626 +01:00 [DBG] RdtClient.Service.Services.TorrentRunner: Processing 1 torrents
2024-02-26 17:51:05.689 +01:00 [DBG] RdtClient.Service.Services.Torrents: Deleting RdtClient data for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)
2024-02-26 17:51:05.707 +01:00 [DBG] RdtClient.Service.Services.Torrents: Deleting RealDebrid Torrent for torrent Batman v Superman L'Aube de la Justice 2016 MULTi VFF 1080p WEB-DL AVC DD+ 5.1-QBDom.mkv (223947415 - Ready 100%) (6ceef7cc-4769-406c-ab32-9304377a20f4)

Settings from RDTC: Post Download Action: Remove Torrent From Client And Provider

After a while, the disk space become an issue and I don't find any option to delete cancelled downloads. I could have missed a setting somewhere but I don't find anything related to delete cancelled titles.

Any idea?

rogerfar commented 6 months ago

The qbittorrent endpoint ignores the file delete command as seen here:

2024-02-26 17:51:05.054 +01:00 [DBG] RdtClient.Service.Middleware.RequestLoggingMiddleware: Method: POST, Path: /api/v2/torrents/delete, Form: hashes: 20c36da819ed8c93bfadc403c92e360e844a29c9, deleteFiles: true
2024-02-26 17:51:05.055 +01:00 [DBG] RdtClient.Web.Controllers.QBittorrentController: Delete 20c36da819ed8c93bfadc403c92e360e844a29c9
2024-02-26 17:51:05.055 +01:00 [DBG] RdtClient.Service.Services.QBittorrent: Delete 20c36da819ed8c93bfadc403c92e360e844a29c9
2024-02-26 17:51:05.119 +01:00 [DBG] RdtClient.Service.Services.QBittorrent: Removing torrents from debrid provider and RDT-Client, no files

I'll fix that in the next release.