X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-search%2Ffind-in-bulk.service.ts;h=125d5e2b868c5537509d7f63b9abb1dd5bbfb364;hb=52798aa5f277492d4dd2482bca9396d2e982fa19;hp=962e374a544cf2a96e74392a4959e5c6ea11fdad;hpb=1378c0d343028f3d40d7d795422684ab9e6a1599;p=github%2FChocobozzz%2FPeerTube.git
diff --git a/client/src/app/shared/shared-search/find-in-bulk.service.ts b/client/src/app/shared/shared-search/find-in-bulk.service.ts
index 962e374a5..125d5e2b8 100644
--- a/client/src/app/shared/shared-search/find-in-bulk.service.ts
+++ b/client/src/app/shared/shared-search/find-in-bulk.service.ts
@@ -1,48 +1,52 @@
import * as debug from 'debug'
import { Observable, Subject } from 'rxjs'
-import { first, map } from 'rxjs/operators'
-import { Injectable, NgZone } from '@angular/core'
+import { filter, first, map } from 'rxjs/operators'
+import { Injectable } from '@angular/core'
import { buildBulkObservable } from '@app/helpers'
import { ResultList } from '@shared/models/common'
import { Video, VideoChannel } from '../shared-main'
import { VideoPlaylist } from '../shared-video-playlist'
import { SearchService } from './search.service'
+import { AdvancedSearch } from './advanced-search.model'
-const logger = debug('peertube:search:FindInBulkService')
+const debugLogger = debug('peertube:search:FindInBulkService')
type BulkObservables
= {
notifier: Subject
- result: Observable
+ result: Observable<{ params: P[], response: R }>
}
@Injectable()
export class FindInBulkService {
+ private advancedSearchForBulk: AdvancedSearch
+
private getVideoInBulk: BulkObservables>
private getChannelInBulk: BulkObservables>
private getPlaylistInBulk: BulkObservables>
constructor (
- private searchService: SearchService,
- private ngZone: NgZone
+ private searchService: SearchService
) {
this.getVideoInBulk = this.buildBulkObservableObject(this.getVideosInBulk.bind(this))
this.getChannelInBulk = this.buildBulkObservableObject(this.getChannelsInBulk.bind(this))
this.getPlaylistInBulk = this.buildBulkObservableObject(this.getPlaylistsInBulk.bind(this))
+
+ this.advancedSearchForBulk = new AdvancedSearch({ searchTarget: 'local' })
}
getVideo (uuid: string): Observable