Prevent new torrents from being removed from the debrid provider when the symlink download client is selected.
Make the downloader an option when adding a new torrent.
This commit is contained in:
parent
ba3a12e305
commit
2cea7ed292
2 changed files with 30 additions and 3 deletions
|
|
@ -42,6 +42,20 @@
|
|||
|
||||
<div class="separator">Advanced settings</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Downloader</label>
|
||||
<div class="control select is-fullwidth">
|
||||
<select [(ngModel)]="downloadClient" (ngModelChange)="setFinishAction()">
|
||||
<option [ngValue]="0">Internal Downloader</option>
|
||||
<option [ngValue]="1">Aria2c</option>
|
||||
<option [ngValue]="2">Symlink Downloader</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help">
|
||||
Select which downloader is used to download this torrent from the debrid provider to your host.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Post Download Action</label>
|
||||
<div class="control select is-fullwidth">
|
||||
|
|
@ -103,14 +117,13 @@
|
|||
</p>
|
||||
<p class="help" *ngIf="downloadAction === 2">This setting does not apply to manually selected files.</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Finished action</label>
|
||||
<div class="control select is-fullwidth">
|
||||
<select [(ngModel)]="finishedAction">
|
||||
<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]="1" *ngIf="downloadClient !== 2">Remove torrent from provider and client</option>
|
||||
<option [ngValue]="2" *ngIf="downloadClient !== 2">Remove torrent from provider</option>
|
||||
<option [ngValue]="3">Remove torrent from client</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export class AddNewTorrentComponent implements OnInit {
|
|||
private currentTorrentFile: string;
|
||||
|
||||
public provider: string;
|
||||
public downloadClient: number;
|
||||
|
||||
public category: string;
|
||||
public hostDownloadAction: number = 0;
|
||||
|
|
@ -46,6 +47,7 @@ export class AddNewTorrentComponent implements OnInit {
|
|||
this.settingsService.get().subscribe((settings) => {
|
||||
const providerSetting = settings.first((m) => m.key === 'Provider:Provider');
|
||||
this.provider = providerSetting.enumValues[providerSetting.value as number];
|
||||
this.downloadClient = settings.first((m) => m.key === 'DownloadClient:Client')?.value as number;
|
||||
|
||||
this.category = settings.first((m) => m.key === 'Gui:Default:Category')?.value as string;
|
||||
this.hostDownloadAction = this.downloadAction = settings.first((m) => m.key === 'Gui:Default:HostDownloadAction')
|
||||
|
|
@ -60,9 +62,21 @@ export class AddNewTorrentComponent implements OnInit {
|
|||
this.torrentDeleteOnError = settings.first((m) => m.key === 'Gui:Default:DeleteOnError')?.value as number;
|
||||
this.torrentLifetime = settings.first((m) => m.key === 'Gui:Default:TorrentLifetime')?.value as number;
|
||||
this.priority = settings.first((m) => m.key === 'Gui:Default:Priority')?.value as number;
|
||||
|
||||
this.setFinishAction();
|
||||
});
|
||||
}
|
||||
|
||||
public setFinishAction() {
|
||||
if (this.downloadClient === 2){
|
||||
if (this.finishedAction === 1){
|
||||
this.finishedAction = 3;
|
||||
} else if (this.finishedAction === 2){
|
||||
this.finishedAction = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public pickFile(evt: Event): void {
|
||||
const files = (evt.target as HTMLInputElement).files;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue