]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/video/video-import.service.ts
Merge branch 'release/4.3.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / video / video-import.service.ts
index 0a610ab1f530ef40c7efd17cb64f631a8bab57fc..607c08d7142e30f8d406cddfff0c8573947b540a 100644 (file)
@@ -43,15 +43,27 @@ export class VideoImportService {
                .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
-  getMyVideoImports (pagination: RestPagination, sort: SortMeta): Observable<ResultList<VideoImport>> {
+  getMyVideoImports (pagination: RestPagination, sort: SortMeta, search?: string): Observable<ResultList<VideoImport>> {
     let params = new HttpParams()
     params = this.restService.addRestGetParams(params, pagination, sort)
 
+    if (search) {
+      const filters = this.restService.parseQueryStringFilter(search, {
+        videoChannelSyncId: {
+          prefix: 'videoChannelSyncId:'
+        },
+        targetUrl: {
+          prefix: 'targetUrl:'
+        }
+      })
+
+      params = this.restService.addObjectParams(params, filters)
+    }
+
     return this.authHttp
                .get<ResultList<VideoImport>>(UserService.BASE_USERS_URL + '/me/videos/imports', { params })
                .pipe(
                  switchMap(res => this.extractVideoImports(res)),
-                 map(res => this.restExtractor.convertResultListDateToHuman(res)),
                  catchError(err => this.restExtractor.handleError(err))
                )
   }