mirror of https://github.com/Ombi-app/Ombi
parent
fde93d2445
commit
cb127f3858
@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ombi.Api\Ombi.Api.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,11 @@
|
||||
export interface IMovieRatings {
|
||||
critics_rating: string;
|
||||
critics_score: number;
|
||||
audience_rating: string;
|
||||
audience_score: number;
|
||||
}
|
||||
|
||||
export interface ITvRatings {
|
||||
class: string;
|
||||
score: number;
|
||||
}
|
@ -1,15 +1,27 @@
|
||||
import { Component, ViewEncapsulation, Input } from "@angular/core";
|
||||
import { Component, ViewEncapsulation, Input, OnInit, Inject } from "@angular/core";
|
||||
import { ISearchMovieResultV2 } from "../../../../interfaces/ISearchMovieResultV2";
|
||||
import { IAdvancedData, IMovieRequests } from "../../../../interfaces";
|
||||
|
||||
import { IMovieRequests } from "../../../../interfaces";
|
||||
import { SearchV2Service } from "../../../../services/searchV2.service";
|
||||
import { IMovieRatings } from "../../../../interfaces/IRatings";
|
||||
import { APP_BASE_HREF } from "@angular/common";
|
||||
@Component({
|
||||
templateUrl: "./movie-information-panel.component.html",
|
||||
styleUrls: ["../../../media-details.component.scss"],
|
||||
selector: "movie-information-panel",
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class MovieInformationPanelComponent {
|
||||
export class MovieInformationPanelComponent implements OnInit {
|
||||
|
||||
constructor(private searchService: SearchV2Service, @Inject(APP_BASE_HREF) public baseUrl: string) { }
|
||||
|
||||
@Input() public movie: ISearchMovieResultV2;
|
||||
@Input() public request: IMovieRequests;
|
||||
@Input() public advancedOptions: boolean;
|
||||
|
||||
public ratings: IMovieRatings;
|
||||
|
||||
public ngOnInit() {
|
||||
this.searchService.getRottenMovieRatings(this.movie.title, +this.movie.releaseDate.toString().substring(0,4))
|
||||
.subscribe(x => this.ratings = x);
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 9.1 KiB |
Loading…
Reference in new issue