Allow updating the category of a torrent.
This commit is contained in:
parent
799a7ce83b
commit
95306264fd
3 changed files with 12 additions and 0 deletions
|
|
@ -462,6 +462,13 @@
|
||||||
<button class="delete" aria-label="close" (click)="updateSettingsCancel()"></button>
|
<button class="delete" aria-label="close" (click)="updateSettingsCancel()"></button>
|
||||||
</header>
|
</header>
|
||||||
<section class="modal-card-body">
|
<section class="modal-card-body">
|
||||||
|
<div class="field">
|
||||||
|
<label class="label">Category</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" maxlength="100" [(ngModel)]="updateSettingsCategory" />
|
||||||
|
</div>
|
||||||
|
<p class="help">The category becomes a sub-folder in your main download path.</p>
|
||||||
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Priority</label>
|
<label class="label">Priority</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ export class TorrentComponent implements OnInit {
|
||||||
public downloadRetryId: string;
|
public downloadRetryId: string;
|
||||||
|
|
||||||
public isUpdateSettingsModalActive: boolean;
|
public isUpdateSettingsModalActive: boolean;
|
||||||
|
|
||||||
|
public updateSettingsCategory: string;
|
||||||
public updateSettingsPriority: number;
|
public updateSettingsPriority: number;
|
||||||
public updateSettingsDownloadRetryAttempts: number;
|
public updateSettingsDownloadRetryAttempts: number;
|
||||||
public updateSettingsTorrentRetryAttempts: number;
|
public updateSettingsTorrentRetryAttempts: number;
|
||||||
|
|
@ -174,6 +176,7 @@ export class TorrentComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public showUpdateSettingsModal(): void {
|
public showUpdateSettingsModal(): void {
|
||||||
|
this.updateSettingsCategory = this.torrent.category;
|
||||||
this.updateSettingsPriority = this.torrent.priority;
|
this.updateSettingsPriority = this.torrent.priority;
|
||||||
this.updateSettingsDownloadRetryAttempts = this.torrent.downloadRetryAttempts;
|
this.updateSettingsDownloadRetryAttempts = this.torrent.downloadRetryAttempts;
|
||||||
this.updateSettingsTorrentRetryAttempts = this.torrent.torrentRetryAttempts;
|
this.updateSettingsTorrentRetryAttempts = this.torrent.torrentRetryAttempts;
|
||||||
|
|
@ -190,6 +193,7 @@ export class TorrentComponent implements OnInit {
|
||||||
public updateSettingsOk(): void {
|
public updateSettingsOk(): void {
|
||||||
this.updating = true;
|
this.updating = true;
|
||||||
|
|
||||||
|
this.torrent.category = this.updateSettingsCategory;
|
||||||
this.torrent.priority = this.updateSettingsPriority;
|
this.torrent.priority = this.updateSettingsPriority;
|
||||||
this.torrent.downloadRetryAttempts = this.updateSettingsDownloadRetryAttempts;
|
this.torrent.downloadRetryAttempts = this.updateSettingsDownloadRetryAttempts;
|
||||||
this.torrent.torrentRetryAttempts = this.updateSettingsTorrentRetryAttempts;
|
this.torrent.torrentRetryAttempts = this.updateSettingsTorrentRetryAttempts;
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,7 @@ public class TorrentData
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dbTorrent.Category = torrent.Category;
|
||||||
dbTorrent.Priority = torrent.Priority;
|
dbTorrent.Priority = torrent.Priority;
|
||||||
dbTorrent.DownloadRetryAttempts = torrent.DownloadRetryAttempts;
|
dbTorrent.DownloadRetryAttempts = torrent.DownloadRetryAttempts;
|
||||||
dbTorrent.TorrentRetryAttempts = torrent.TorrentRetryAttempts;
|
dbTorrent.TorrentRetryAttempts = torrent.TorrentRetryAttempts;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue