From af58bbbe13d2da75e21bf5a7d9061b75c9a5745b Mon Sep 17 00:00:00 2001 From: tidusjar Date: Mon, 25 Jan 2021 20:48:54 +0000 Subject: [PATCH] Fixed the issue where when enabling "Do not display available content" and you have it all, the posters appear large. --- .../carousel-list/carousel-list.component.ts | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/discover/components/carousel-list/carousel-list.component.ts b/src/Ombi/ClientApp/src/app/discover/components/carousel-list/carousel-list.component.ts index 0279fbd06..942e4707b 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/carousel-list/carousel-list.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/components/carousel-list/carousel-list.component.ts @@ -70,25 +70,27 @@ export class CarouselListComponent implements OnInit { this.discoverOptions = DiscoverOption[DiscoverOption[localDiscoverOptions]]; } - var moviePromise: Promise; - var tvPromise: Promise; - switch (this.discoverOptions) { - case DiscoverOption.Combined: - moviePromise = this.loadMovies(); - tvPromise = this.loadTv(); - break; - case DiscoverOption.Movie: - moviePromise = this.loadMovies(); - break; - case DiscoverOption.Tv: - tvPromise = this.loadTv(); - break; + while(this.discoverResults.length < 14) { + var moviePromise: Promise; + var tvPromise: Promise; + switch (this.discoverOptions) { + case DiscoverOption.Combined: + moviePromise = this.loadMovies(); + tvPromise = this.loadTv(); + break; + case DiscoverOption.Movie: + moviePromise = this.loadMovies(); + break; + case DiscoverOption.Tv: + tvPromise = this.loadTv(); + break; + } + + await moviePromise; + await tvPromise; + + this.createInitialModel(); } - - await moviePromise; - await tvPromise; - - this.createInitialModel(); } public async toggleChanged(event: MatButtonToggleChange) {