mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
fix(availability-rules): 🐛 Show the 'Requested' button when a show has all of the episodes marked as requested
This commit is contained in:
parent
de957b401f
commit
cb7ecf684a
2 changed files with 9 additions and 1 deletions
|
@ -61,10 +61,14 @@
|
|||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
</ng-container>
|
||||
<button *ngIf="!tv.fullyAvailable" mat-raised-button id="requestBtn" class="btn-spacing" color="primary"
|
||||
<button *ngIf="!tv.fullyAvailable && !allEpisodesRequested()" mat-raised-button id="requestBtn" class="btn-spacing" color="primary"
|
||||
(click)="request()"><i class="fas fa-plus"></i>
|
||||
{{ 'Common.Request' | translate }}</button>
|
||||
|
||||
<button *ngIf="allEpisodesRequested()" mat-raised-button class="btn-spacing" color="warn" [disabled]>
|
||||
<i class="fas fa-check"></i>
|
||||
{{ 'Common.Requested' | translate }}</button>
|
||||
|
||||
<button *ngIf="tv.fullyAvailable && !tv.partlyAvailable" id="availableBtn" mat-raised-button class="btn-spacing" color="accent"
|
||||
[disabled]>
|
||||
<i class="fas fa-check"></i> {{'Common.Available' | translate }}</button>
|
||||
|
|
|
@ -125,6 +125,10 @@ export class TvDetailsComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
public allEpisodesRequested(): boolean {
|
||||
return this.tv.seasonRequests.every(e => e.episodes.every(x => x.approved));
|
||||
}
|
||||
|
||||
private loadAdvancedInfo() {
|
||||
const profile = this.sonarrService.getQualityProfilesWithoutSettings();
|
||||
const folders = this.sonarrService.getRootFoldersWithoutSettings();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue