From 957f7db195d7b74d1e736f643b494a704fc7c254 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 3 Apr 2019 21:16:31 +0100 Subject: [PATCH] Added the collections back to the page! --- .../discover-collections.component.html | 12 +++++++++--- .../collections/discover-collections.component.ts | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/discover/collections/discover-collections.component.html b/src/Ombi/ClientApp/src/app/discover/collections/discover-collections.component.html index c5a8a0303..c78378a2d 100644 --- a/src/Ombi/ClientApp/src/app/discover/collections/discover-collections.component.html +++ b/src/Ombi/ClientApp/src/app/discover/collections/discover-collections.component.html @@ -1,8 +1,14 @@
-
-

{{collection.name}}

-

{{collection.overview}}

+
+

{{collection.name}}

+
+
+

{{collection.overview}}

+
+
+
diff --git a/src/Ombi/ClientApp/src/app/discover/collections/discover-collections.component.ts b/src/Ombi/ClientApp/src/app/discover/collections/discover-collections.component.ts index 729923e83..872ffc9cc 100644 --- a/src/Ombi/ClientApp/src/app/discover/collections/discover-collections.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/collections/discover-collections.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; -import { SearchV2Service } from "../../services"; +import { SearchV2Service, RequestService, NotificationService, MessageService } from "../../services"; import { IMovieCollectionsViewModel } from "../../interfaces/ISearchTvResultV2"; import { IDiscoverCardResult } from "../interfaces"; import { RequestType } from "../../interfaces"; @@ -17,7 +17,10 @@ export class DiscoverCollectionsComponent implements OnInit { public discoverResults: IDiscoverCardResult[] = []; - constructor(private searchService: SearchV2Service, private route: ActivatedRoute) { + constructor(private searchService: SearchV2Service, + private route: ActivatedRoute, + private requestService: RequestService, + private messageService: MessageService) { this.route.params.subscribe((params: any) => { this.collectionId = params.collectionId; }); @@ -29,6 +32,13 @@ export class DiscoverCollectionsComponent implements OnInit { this.createModel(); } + public async requestCollection() { + await this.collection.collection.forEach(async (movie) => { + await this.requestService.requestMovie({theMovieDbId: movie.id, languageCode: null}).toPromise(); + }); + this.messageService.send("Requested Collection"); + } + private createModel() { this.finishLoading(); this.collection.collection.forEach(m => {