fix: Partially Available prevents further TV requests (#4768) (#4779)

pull/4786/head
Wesley King 2 years ago committed by GitHub
parent 76a0d0d268
commit 031e2b9283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,11 +57,11 @@
<i class="far fa-play-circle fa-2x"></i>
</a>
</ng-container>
<button *ngIf="!tv.fullyAvailable && !allEpisodesRequested()" mat-raised-button id="requestBtn" class="btn-spacing" color="primary"
(click)="request()"><i class="fas fa-plus"></i>
<button *ngIf="(!tv.fullyAvailable || (tv.fullyAvailable && tv.partlyAvailable)) && !allEpisodesRequestedOrAvailable()" mat-raised-button id="requestBtn" class="btn-spacing" color="primary"
(click)="request()"><i class="fas fa-plus"></i>
{{ 'Common.Request' | translate }}</button>
<button *ngIf="!tv.denied && allEpisodesRequested()" mat-raised-button class="btn-spacing" color="warn" [disabled]>
<button *ngIf="!tv.denied && allEpisodesRequestedOrAvailable()" mat-raised-button class="btn-spacing" color="warn" [disabled]>
<i class="fas fa-check"></i>
{{ 'Common.Requested' | translate }}</button>

@ -126,9 +126,10 @@ export class TvDetailsComponent implements OnInit {
}
}
public allEpisodesRequested(): boolean {
return this.tv.seasonRequests.every(e => e.episodes.every(x => x.approved || x.requested));
public allEpisodesRequestedOrAvailable(): boolean {
return this.tv.seasonRequests.every(e => e.episodes.every(x => x.available || x.approved || x.requested));
}
private checkPoster() {
if (this.tv.images.original == null) {
this.tv.images.original = "../../../images/default_movie_poster.png";

Loading…
Cancel
Save