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; + await moviePromise; + await tvPromise; - this.createInitialModel(); + this.createInitialModel(); + } } public async toggleChanged(event: MatButtonToggleChange) {