-import { Observable } from 'rxjs'
+import { Observable, of } from 'rxjs'
import { catchError, map, switchMap } from 'rxjs/operators'
import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
}): Observable<ResultList<Video>> {
const { search, uuids, componentPagination, advancedSearch } = parameters
+ if (advancedSearch.resultType !== undefined && advancedSearch.resultType !== 'videos') {
+ return of({ total: 0, data: [] })
+ }
+
const url = SearchService.BASE_SEARCH_URL + 'videos'
let pagination: RestPagination
}): Observable<ResultList<VideoChannel>> {
const { search, advancedSearch, componentPagination, handles } = parameters
+ if (advancedSearch.resultType !== undefined && advancedSearch.resultType !== 'channels') {
+ return of({ total: 0, data: [] })
+ }
+
const url = SearchService.BASE_SEARCH_URL + 'video-channels'
let pagination: RestPagination
}): Observable<ResultList<VideoPlaylist>> {
const { search, advancedSearch, componentPagination, uuids } = parameters
+ if (advancedSearch.resultType !== undefined && advancedSearch.resultType !== 'playlists') {
+ return of({ total: 0, data: [] })
+ }
+
const url = SearchService.BASE_SEARCH_URL + 'video-playlists'
let pagination: RestPagination