Change delete behaviour for the QBittorrent Delete endpoint.
Some checks failed
Docker Image CI / build (push) Has been cancelled

This commit is contained in:
Roger Far 2024-03-05 19:05:26 -07:00
parent eef7267390
commit 99a29ca6a8
5 changed files with 18 additions and 7 deletions

View file

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.0.63] - 2024-03-05
### Changed
- When Sonarr/Radarr requests a torrent to be deleted, and its files too, then delete those files instead of ingoring it.
## [2.0.62] - 2024-02-17 ## [2.0.62] - 2024-02-17
### Changed ### Changed
- Fixed reporting a torrent as error when some downloads have failed but still need to be retried. - Fixed reporting a torrent as error when some downloads have failed but still need to be retried.

View file

@ -55,7 +55,7 @@
<a class="navbar-item" routerLink="profile"> Profile </a> <a class="navbar-item" routerLink="profile"> Profile </a>
<a class="navbar-item" (click)="logout()"> Logout </a> <a class="navbar-item" (click)="logout()"> Logout </a>
<hr class="navbar-divider" /> <hr class="navbar-divider" />
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.62</a> <a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.63</a>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,6 +1,6 @@
{ {
"name": "rdt-client", "name": "rdt-client",
"version": "2.0.62", "version": "2.0.63",
"description": "This is a web interface to manage your torrents on Real-Debrid.", "description": "This is a web interface to manage your torrents on Real-Debrid.",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {

View file

@ -398,7 +398,14 @@ public class QBittorrent
public async Task TorrentsDelete(String hash, Boolean deleteFiles) public async Task TorrentsDelete(String hash, Boolean deleteFiles)
{ {
_logger.LogDebug($"Delete {hash}"); if (deleteFiles)
{
_logger.LogDebug($"Delete {hash}, with files");
}
else
{
_logger.LogDebug($"Delete {hash}, no files");
}
var torrent = await _torrents.GetByHash(hash); var torrent = await _torrents.GetByHash(hash);
@ -411,17 +418,17 @@ public class QBittorrent
{ {
case TorrentFinishedAction.RemoveAllTorrents: case TorrentFinishedAction.RemoveAllTorrents:
_logger.LogDebug("Removing torrents from debrid provider and RDT-Client, no files"); _logger.LogDebug("Removing torrents from debrid provider and RDT-Client, no files");
await _torrents.Delete(torrent.TorrentId, true, true, false); await _torrents.Delete(torrent.TorrentId, true, true, deleteFiles);
break; break;
case TorrentFinishedAction.RemoveRealDebrid: case TorrentFinishedAction.RemoveRealDebrid:
_logger.LogDebug("Removing torrents from debrid provider, no files"); _logger.LogDebug("Removing torrents from debrid provider, no files");
await _torrents.Delete(torrent.TorrentId, false, true, false); await _torrents.Delete(torrent.TorrentId, false, true, deleteFiles);
break; break;
case TorrentFinishedAction.RemoveClient: case TorrentFinishedAction.RemoveClient:
_logger.LogDebug("Removing torrents from client, no files"); _logger.LogDebug("Removing torrents from client, no files");
await _torrents.Delete(torrent.TorrentId, true, false, false); await _torrents.Delete(torrent.TorrentId, true, false, deleteFiles);
break; break;
case TorrentFinishedAction.None: case TorrentFinishedAction.None:

View file

@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId> <UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
<Version>2.0.62</Version> <Version>2.0.63</Version>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>