mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-23 06:25:24 -07:00
Clean up code
This commit is contained in:
parent
56ff16238f
commit
d1f9343065
1 changed files with 6 additions and 14 deletions
|
@ -33,20 +33,12 @@ export class DiscoverActorComponent {
|
|||
this.discoverResults = [];
|
||||
this.loading();
|
||||
|
||||
var searches = [];
|
||||
var moviesSearch = this.searchService.getMoviesByActor(this.actorId);
|
||||
moviesSearch.subscribe(res => {
|
||||
this.pushDiscoverResults(res.cast, RequestType.movie);
|
||||
});
|
||||
searches.push(moviesSearch);
|
||||
|
||||
var TvSearch = this.searchService.getTvByActor(this.actorId);
|
||||
TvSearch.subscribe(res => {
|
||||
this.pushDiscoverResults(res.cast, RequestType.tvShow);
|
||||
});
|
||||
searches.push(TvSearch);
|
||||
|
||||
forkJoin(searches).subscribe(() => {
|
||||
forkJoin([
|
||||
this.searchService.getMoviesByActor(this.actorId),
|
||||
this.searchService.getTvByActor(this.actorId)
|
||||
]).subscribe(([movie, tv]) => {
|
||||
this.pushDiscoverResults(movie.cast, RequestType.movie);
|
||||
this.pushDiscoverResults(tv.cast, RequestType.tvShow);
|
||||
this.finishLoading();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue