mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -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="row justify-content-md-center top-spacing">
|
||||
<h3 class="row">{{collection.name}}</h3>
|
||||
<p class="row">{{collection.overview}}</p>
|
||||
<div class="row top-spacing">
|
||||
<h3 class="col-12 text-center">{{collection.name}}</h3>
|
||||
</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 *ngIf="loadingFlag" class="row justify-content-md-center top-spacing loading-spinner">
|
||||
<mat-spinner [color]="'accent'"></mat-spinner>
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue