mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-23 14:35: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.discoverResults = [];
|
||||||
this.loading();
|
this.loading();
|
||||||
|
|
||||||
var searches = [];
|
forkJoin([
|
||||||
var moviesSearch = this.searchService.getMoviesByActor(this.actorId);
|
this.searchService.getMoviesByActor(this.actorId),
|
||||||
moviesSearch.subscribe(res => {
|
this.searchService.getTvByActor(this.actorId)
|
||||||
this.pushDiscoverResults(res.cast, RequestType.movie);
|
]).subscribe(([movie, tv]) => {
|
||||||
});
|
this.pushDiscoverResults(movie.cast, RequestType.movie);
|
||||||
searches.push(moviesSearch);
|
this.pushDiscoverResults(tv.cast, RequestType.tvShow);
|
||||||
|
|
||||||
var TvSearch = this.searchService.getTvByActor(this.actorId);
|
|
||||||
TvSearch.subscribe(res => {
|
|
||||||
this.pushDiscoverResults(res.cast, RequestType.tvShow);
|
|
||||||
});
|
|
||||||
searches.push(TvSearch);
|
|
||||||
|
|
||||||
forkJoin(searches).subscribe(() => {
|
|
||||||
this.finishLoading();
|
this.finishLoading();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue