mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 11:38:32 -07:00
fix(discover): 🐛 Fixed the issue where there was an option on the discover to request 4k shows (that's not supported currently)
This commit is contained in:
parent
19fe4e342e
commit
dcfd688c8d
2 changed files with 31 additions and 21 deletions
|
@ -20,24 +20,32 @@
|
|||
</a>
|
||||
</div>
|
||||
<div [ngClass]="result.posterPath.includes('images/') ? 'button-request-container-show' : 'button-request-container'" class="row" *ngIf="!result.available && !result.approved && !result.requested">
|
||||
<div *ngIf="!is4kEnabled" class="button-request poster-overlay">
|
||||
<button id="requestButton{{result.id}}{{result.type}}{{discoverType}}" *ngIf="requestable" mat-raised-button class="btn-ombi full-width poster-request-btn" (click)="request($event, false)">
|
||||
<i *ngIf="!loading" class="fa-lg fas fa-cloud-download-alt"></i>
|
||||
<i *ngIf="loading" class="fas fa-spinner fa-pulse fa-2x fa-fw" aria-hidden="true"></i>
|
||||
{{'Common.Request' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="is4kEnabled && requestable" class="button-request poster-overlay">
|
||||
<button [matMenuTriggerFor]="menu" id="requestButton{{result.id}}{{result.type}}{{discoverType}}" mat-raised-button class="btn-ombi full-width poster-request-btn">
|
||||
<i *ngIf="!loading" class="fa-lg fas fa-cloud-download-alt"></i>
|
||||
<i *ngIf="loading" class="fas fa-spinner fa-pulse fa-2x fa-fw" aria-hidden="true"></i>
|
||||
{{'Common.Request' | translate }}
|
||||
</button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item class="btn-ombi full-width poster-request-btn" (click)="request($event, false)">{{'Common.Request' | translate }}</button>
|
||||
<button mat-menu-item class="btn-ombi full-width poster-request-btn" (click)="request($event, true)">{{'Common.Request4K' | translate }}</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
|
||||
<div *ngIf="is4kEnabled && requestable && result.type === RequestType.movie;then show4K else regular"></div>
|
||||
<ng-template #show4K>
|
||||
<div class="button-request poster-overlay">
|
||||
<button [matMenuTriggerFor]="menu" id="requestButton{{result.id}}{{result.type}}{{discoverType}}" mat-raised-button class="btn-ombi full-width poster-request-btn">
|
||||
<i *ngIf="!loading" class="fa-lg fas fa-cloud-download-alt"></i>
|
||||
<i *ngIf="loading" class="fas fa-spinner fa-pulse fa-2x fa-fw" aria-hidden="true"></i>
|
||||
{{'Common.Request' | translate }}
|
||||
</button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item class="btn-ombi full-width poster-request-btn" (click)="request($event, false)">{{'Common.Request' | translate }}</button>
|
||||
<button mat-menu-item class="btn-ombi full-width poster-request-btn" (click)="request($event, true)">{{'Common.Request4K' | translate }}</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #regular>
|
||||
<div class="button-request poster-overlay">
|
||||
<button id="requestButton{{result.id}}{{result.type}}{{discoverType}}" *ngIf="requestable" mat-raised-button class="btn-ombi full-width poster-request-btn" (click)="request($event, false)">
|
||||
<i *ngIf="!loading" class="fa-lg fas fa-cloud-download-alt"></i>
|
||||
<i *ngIf="loading" class="fas fa-spinner fa-pulse fa-2x fa-fw" aria-hidden="true"></i>
|
||||
{{'Common.Request' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -26,6 +26,7 @@ export class DiscoverCardComponent implements OnInit {
|
|||
public hide: boolean;
|
||||
public fullyLoaded = false;
|
||||
public loading: boolean;
|
||||
public allow4KButton: boolean = false;
|
||||
|
||||
public requestable: boolean;
|
||||
|
||||
|
@ -41,6 +42,7 @@ export class DiscoverCardComponent implements OnInit {
|
|||
this.getExtraTvInfo();
|
||||
}
|
||||
if (this.result.type == RequestType.movie) {
|
||||
this.allow4KButton = true;
|
||||
this.getExtraMovieInfo();
|
||||
}
|
||||
if (this.result.type == RequestType.album) {
|
||||
|
@ -169,9 +171,9 @@ export class DiscoverCardComponent implements OnInit {
|
|||
|
||||
private updateMovieItem(updated: ISearchMovieResultV2) {
|
||||
this.result.url = "http://www.imdb.com/title/" + updated.imdbId + "/";
|
||||
this.result.available = updated.available;
|
||||
this.result.requested = updated.requested;
|
||||
this.result.approved = updated.approved;
|
||||
this.result.available = updated.available || updated.available4K;
|
||||
this.result.requested = updated.requested || updated.has4KRequest;
|
||||
this.result.approved = updated.approved || updated.available4K;
|
||||
this.result.rating = updated.voteAverage;
|
||||
this.result.overview = updated.overview;
|
||||
this.result.imdbid = updated.imdbId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue