mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 05:13:18 -07:00
Added the collections back to the page!
This commit is contained in:
parent
e6ec08052d
commit
957f7db195
2 changed files with 21 additions and 5 deletions
|
@ -1,8 +1,14 @@
|
||||||
<div class="small-middle-container" *ngIf="collection">
|
<div class="small-middle-container" *ngIf="collection">
|
||||||
|
|
||||||
<div class="row justify-content-md-center top-spacing">
|
<div class="row top-spacing">
|
||||||
<h3 class="row">{{collection.name}}</h3>
|
<h3 class="col-12 text-center">{{collection.name}}</h3>
|
||||||
<p class="row">{{collection.overview}}</p>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<p class="col-12 text-center">{{collection.overview}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-md-center">
|
||||||
|
<button class="col-2" mat-raised-button color="accent" (click)="requestCollection();">Request
|
||||||
|
Collection</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="loadingFlag" class="row justify-content-md-center top-spacing loading-spinner">
|
<div *ngIf="loadingFlag" class="row justify-content-md-center top-spacing loading-spinner">
|
||||||
<mat-spinner [color]="'accent'"></mat-spinner>
|
<mat-spinner [color]="'accent'"></mat-spinner>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component, OnInit } from "@angular/core";
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { SearchV2Service } from "../../services";
|
import { SearchV2Service, RequestService, NotificationService, MessageService } from "../../services";
|
||||||
import { IMovieCollectionsViewModel } from "../../interfaces/ISearchTvResultV2";
|
import { IMovieCollectionsViewModel } from "../../interfaces/ISearchTvResultV2";
|
||||||
import { IDiscoverCardResult } from "../interfaces";
|
import { IDiscoverCardResult } from "../interfaces";
|
||||||
import { RequestType } from "../../interfaces";
|
import { RequestType } from "../../interfaces";
|
||||||
|
@ -17,7 +17,10 @@ export class DiscoverCollectionsComponent implements OnInit {
|
||||||
|
|
||||||
public discoverResults: IDiscoverCardResult[] = [];
|
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.route.params.subscribe((params: any) => {
|
||||||
this.collectionId = params.collectionId;
|
this.collectionId = params.collectionId;
|
||||||
});
|
});
|
||||||
|
@ -29,6 +32,13 @@ export class DiscoverCollectionsComponent implements OnInit {
|
||||||
this.createModel();
|
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() {
|
private createModel() {
|
||||||
this.finishLoading();
|
this.finishLoading();
|
||||||
this.collection.collection.forEach(m => {
|
this.collection.collection.forEach(m => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue