Add finish action "Only delete from client".

This commit is contained in:
Roger Far 2022-10-18 11:05:35 -06:00
parent 43da8c2220
commit 799a7ce83b
4 changed files with 11 additions and 1 deletions

View file

@ -90,6 +90,7 @@
<option [ngValue]="0">Do nothing</option>
<option [ngValue]="1">Remove torrent from provider and client</option>
<option [ngValue]="2">Remove torrent from provider</option>
<option [ngValue]="3">Remove torrent from client</option>
</select>
</div>
</div>

View file

@ -67,6 +67,7 @@
<ng-container *ngSwitchCase="0">Do nothing</ng-container>
<ng-container *ngSwitchCase="1">Remove torrent from Real-Debrid and Real-Debrid Client</ng-container>
<ng-container *ngSwitchCase="2">Remove torrent from Real-Debrid</ng-container>
<ng-container *ngSwitchCase="3">Remove torrent from client</ng-container>
</ng-container>
</div>
<div class="field">

View file

@ -11,5 +11,8 @@ public enum TorrentFinishedAction
RemoveAllTorrents = 1,
[Description("Remove Torrent From Provider")]
RemoveRealDebrid = 2
RemoveRealDebrid = 2,
[Description("Remove Torrent From Client")]
RemoveClient = 3
}

View file

@ -527,6 +527,11 @@ public class TorrentRunner
Log($"Removing torrents from Real-Debrid, no files", torrent);
await _torrents.Delete(torrent.TorrentId, false, true, false);
break;
case TorrentFinishedAction.RemoveClient:
Log($"Removing torrents from client, no files", torrent);
await _torrents.Delete(torrent.TorrentId, true, false, false);
break;
case TorrentFinishedAction.None:
Log($"Not removing torrents or files", torrent);