Update torrent-table.component.html
Added retry selected Added change selected's settings
This commit is contained in:
parent
26e08c765c
commit
71b5ab5406
1 changed files with 196 additions and 31 deletions
|
|
@ -12,24 +12,24 @@
|
||||||
(click)="toggleSelectAll($event)"
|
(click)="toggleSelectAll($event)"
|
||||||
[checked]="selectedTorrents.length > 0 && selectedTorrents.length === torrents.length"
|
[checked]="selectedTorrents.length > 0 && selectedTorrents.length === torrents.length"
|
||||||
/>
|
/>
|
||||||
</th>
|
</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Category</th>
|
<th>Category</th>
|
||||||
<th>Priority</th>
|
<th>Priority</th>
|
||||||
<th>Files</th>
|
<th>Files</th>
|
||||||
<th>Downloads</th>
|
<th>Downloads</th>
|
||||||
<th>Size</th>
|
<th>Size</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let torrent of torrents; trackBy: trackByMethod">
|
<tr *ngFor="let torrent of torrents; trackBy: trackByMethod">
|
||||||
<td>
|
<td>
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
(click)="toggleSelect(torrent.torrentId)"
|
(click)="toggleSelect(torrent.torrentId)"
|
||||||
[checked]="selectedTorrents.contains(torrent.torrentId)"
|
[checked]="selectedTorrents.contains(torrent.torrentId)"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td (click)="openTorrent(torrent.torrentId)">
|
<td (click)="openTorrent(torrent.torrentId)">
|
||||||
{{ torrent.rdName }}
|
{{ torrent.rdName }}
|
||||||
|
|
@ -56,14 +56,42 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<button
|
<div class="field is-grouped">
|
||||||
class="button is-danger"
|
|
||||||
(click)="showDeleteModal()"
|
<div class="control">
|
||||||
[disabled]="selectedTorrents.length === 0"
|
<button
|
||||||
*ngIf="torrents.length > 0"
|
class="button is-danger"
|
||||||
>
|
(click)="showDeleteModal()"
|
||||||
Delete Selected
|
[disabled]="selectedTorrents.length === 0"
|
||||||
</button>
|
*ngIf="torrents.length > 0"
|
||||||
|
>
|
||||||
|
Delete Selected
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control">
|
||||||
|
<button
|
||||||
|
class="button is-primary"
|
||||||
|
(click)="showRetryModal()"
|
||||||
|
[disabled]="selectedTorrents.length === 0"
|
||||||
|
*ngIf="torrents.length > 0"
|
||||||
|
>
|
||||||
|
Retry Selected
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control">
|
||||||
|
<button
|
||||||
|
class="button is-light"
|
||||||
|
(click)="showUpdateSettingsModal()"
|
||||||
|
[disabled]="selectedTorrents.length === 0"
|
||||||
|
*ngIf="torrents.length > 0"
|
||||||
|
>
|
||||||
|
Change Selected's Settings
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal" [class.is-active]="isDeleteModalActive">
|
<div class="modal" [class.is-active]="isDeleteModalActive">
|
||||||
|
|
@ -103,11 +131,11 @@
|
||||||
</section>
|
</section>
|
||||||
<footer class="modal-card-foot">
|
<footer class="modal-card-foot">
|
||||||
<button
|
<button
|
||||||
class="button is-success"
|
class="button is-success"
|
||||||
(click)="deleteOk()"
|
(click)="deleteOk()"
|
||||||
[disabled]="deleting"
|
[disabled]="deleting"
|
||||||
[ngClass]="{ 'is-loading': deleting }"
|
[ngClass]="{ 'is-loading': deleting }"
|
||||||
>
|
>
|
||||||
Delete selected
|
Delete selected
|
||||||
</button>
|
</button>
|
||||||
<button class="button" (click)="deleteCancel()" [disabled]="deleting" [ngClass]="{ 'is-loading': deleting }">
|
<button class="button" (click)="deleteCancel()" [disabled]="deleting" [ngClass]="{ 'is-loading': deleting }">
|
||||||
|
|
@ -116,3 +144,140 @@
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal" [class.is-active]="isUpdateSettingsModalActive">
|
||||||
|
<div class="modal-background"></div>
|
||||||
|
<div class="modal-card">
|
||||||
|
<header class="modal-card-head">
|
||||||
|
<p class="modal-card-title">Update selected torrents settings</p>
|
||||||
|
<button class="delete" aria-label="close" (click)="updateSettingsCancel()"></button>
|
||||||
|
</header>
|
||||||
|
<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">
|
||||||
|
<label class="label">Priority</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="number" step="1" [(ngModel)]="updateSettingsPriority" />
|
||||||
|
</div>
|
||||||
|
<p class="help">
|
||||||
|
Set the priority for this torrent where 1 is the highest. When empty it will be assigned the lowest priority.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label">Automatic retry downloads</label>
|
||||||
|
<div class="control">
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
max="1000"
|
||||||
|
min="0"
|
||||||
|
step="1"
|
||||||
|
[(ngModel)]="updateSettingsDownloadRetryAttempts"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<p class="help">When a single download fails it will retry it this many times before marking it as failed.</p>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label">Automatic retry torrent</label>
|
||||||
|
<div class="control">
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
max="1000"
|
||||||
|
min="0"
|
||||||
|
step="1"
|
||||||
|
[(ngModel)]="updateSettingsTorrentRetryAttempts"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<p class="help">
|
||||||
|
When a single download has failed multiple times (see setting above) or when the torrent itself received an
|
||||||
|
error it will retry the full torrent this many times before marking it failed.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label">Delete download when in error</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="number" max="1000" min="0" step="1" [(ngModel)]="updateSettingsDeleteOnError" />
|
||||||
|
</div>
|
||||||
|
<p class="help">
|
||||||
|
When a download has been in error for this many minutes, delete it from the provider and the client. 0 to
|
||||||
|
disable.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label">Torrent maximum lifetime</label>
|
||||||
|
<div class="control">
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
max="100000"
|
||||||
|
min="0"
|
||||||
|
step="1"
|
||||||
|
[(ngModel)]="updateSettingsTorrentLifetime"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<p class="help">
|
||||||
|
The maximum lifetime of a torrent in minutes. When this time has passed, mark the torrent as error. If the
|
||||||
|
torrent is completed and has downloads, the lifetime setting will not apply. 0 to disable.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<footer class="modal-card-foot">
|
||||||
|
<button
|
||||||
|
class="button is-success"
|
||||||
|
(click)="updateSettingsOk()"
|
||||||
|
[disabled]="updating"
|
||||||
|
[ngClass]="{ 'is-loading': updating }"
|
||||||
|
>
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="button"
|
||||||
|
(click)="updateSettingsCancel()"
|
||||||
|
[disabled]="updating"
|
||||||
|
[ngClass]="{ 'is-loading': updating }"
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal" [class.is-active]="isRetryModalActive">
|
||||||
|
<div class="modal-background"></div>
|
||||||
|
<div class="modal-card">
|
||||||
|
<header class="modal-card-head">
|
||||||
|
<p class="modal-card-title">Retry torrents</p>
|
||||||
|
<button class="delete" aria-label="close" (click)="retryCancel()"></button>
|
||||||
|
</header>
|
||||||
|
<section class="modal-card-body">
|
||||||
|
<p>Are you sure you want to retry the selected torrents?</p>
|
||||||
|
<p>
|
||||||
|
This action will delete all the torrent data + all local downloads. Then it will re-add the original magnet link
|
||||||
|
or torrent file to Real-Debrid.
|
||||||
|
</p>
|
||||||
|
<div class="notification is-danger is-light" *ngIf="retryError?.length > 0">
|
||||||
|
Error retrying torrent: {{ retryError }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<footer class="modal-card-foot">
|
||||||
|
<button
|
||||||
|
class="button is-success"
|
||||||
|
(click)="retryOk()"
|
||||||
|
[disabled]="retrying"
|
||||||
|
[ngClass]="{ 'is-loading': retrying }"
|
||||||
|
>
|
||||||
|
Retry
|
||||||
|
</button>
|
||||||
|
<button class="button" (click)="retryCancel()" [disabled]="retrying" [ngClass]="{ 'is-loading': retrying }">
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue