mirror of https://github.com/Ombi-app/Ombi
parent
ce33a4212d
commit
2d6ed4056b
@ -0,0 +1,12 @@
|
||||
<div *ngIf="movie">
|
||||
<div>
|
||||
<img src="{{movie.background}}" class="banner" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div>
|
||||
{{movie.title}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,7 @@
|
||||
.banner {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
width: 100%;
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { SearchService, ImageService } from "../services";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { ISearchMovieResult } from "../interfaces";
|
||||
import { DomSanitizer } from "@angular/platform-browser";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./movie-details.component.html",
|
||||
styleUrls: ["./movie-details.component.scss"],
|
||||
})
|
||||
export class MovieDetailsComponent {
|
||||
public movie: ISearchMovieResult;
|
||||
private theMovidDbId: number;
|
||||
|
||||
constructor(private searchService: SearchService, private route: ActivatedRoute,
|
||||
private sanitizer: DomSanitizer, private imageService: ImageService) {
|
||||
this.route.params.subscribe((params: any) => {
|
||||
this.theMovidDbId = params.movieDbId;
|
||||
this.load();
|
||||
});
|
||||
}
|
||||
|
||||
public load() {
|
||||
this.searchService.getMovieInformation(this.theMovidDbId).subscribe(x => {
|
||||
this.movie = x;
|
||||
|
||||
this.imageService.getMovieBanner(this.theMovidDbId.toString()).subscribe(x => this.movie.background = x);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in new issue