Add "Post download action" to the settings dialog.

This commit is contained in:
Roger Versluis 2023-09-02 16:20:41 -06:00
parent ee88fb50f5
commit 3b9a68c92f
3 changed files with 17 additions and 0 deletions

View file

@ -469,6 +469,19 @@
<button class="delete" aria-label="close" (click)="updateSettingsCancel()"></button>
</header>
<section class="modal-card-body">
<div class="field">
<label class="label">Post Download Action</label>
<div class="control select is-fullwidth">
<select [(ngModel)]="updateSettingsHostDownloadAction">
<option [ngValue]="0">Download all files to host</option>
<option [ngValue]="1">Don't download any files to host</option>
</select>
</div>
<p class="help">
When a torrent is finished downloading on the provider, perform this action. Use this setting if you only want
to add files to Real-Debrid but not download them to the host.
</p>
</div>
<div class="field">
<label class="label">Category</label>
<div class="control">

View file

@ -36,6 +36,7 @@ export class TorrentComponent implements OnInit {
public isUpdateSettingsModalActive: boolean;
public updateSettingsHostDownloadAction: number;
public updateSettingsCategory: string;
public updateSettingsPriority: number;
public updateSettingsDownloadRetryAttempts: number;
@ -176,6 +177,7 @@ export class TorrentComponent implements OnInit {
}
public showUpdateSettingsModal(): void {
this.updateSettingsHostDownloadAction = this.torrent.hostDownloadAction;
this.updateSettingsCategory = this.torrent.category;
this.updateSettingsPriority = this.torrent.priority;
this.updateSettingsDownloadRetryAttempts = this.torrent.downloadRetryAttempts;
@ -193,6 +195,7 @@ export class TorrentComponent implements OnInit {
public updateSettingsOk(): void {
this.updating = true;
this.torrent.hostDownloadAction = this.updateSettingsHostDownloadAction;
this.torrent.category = this.updateSettingsCategory;
this.torrent.priority = this.updateSettingsPriority;
this.torrent.downloadRetryAttempts = this.updateSettingsDownloadRetryAttempts;

View file

@ -147,6 +147,7 @@ public class TorrentData
return;
}
dbTorrent.HostDownloadAction = torrent.HostDownloadAction;
dbTorrent.Category = torrent.Category;
dbTorrent.Priority = torrent.Priority;
dbTorrent.DownloadRetryAttempts = torrent.DownloadRetryAttempts;