]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/video-list/video-local.component.ts
Merge branch 'feature/strong-model-types' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-list / video-local.component.ts
index 5de4a13afdb175b03c396ba559fac8d4ad005dee..b96e46e6a9ca899916c7530b12109c118ac7cd3f 100644 (file)
@@ -10,6 +10,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
 import { ScreenService } from '@app/shared/misc/screen.service'
 import { UserRight } from '../../../../../shared/models/users'
 import { Notifier, ServerService } from '@app/core'
+import { HooksService } from '@app/core/plugins/hooks.service'
 
 @Component({
   selector: 'my-videos-local',
@@ -31,7 +32,8 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On
     protected notifier: Notifier,
     protected authService: AuthService,
     protected screenService: ScreenService,
-    private videoService: VideoService
+    private videoService: VideoService,
+    private hooks: HooksService
   ) {
     super()
 
@@ -55,14 +57,21 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On
 
   getVideosObservable (page: number) {
     const newPagination = immutableAssign(this.pagination, { currentPage: page })
-
-    return this.videoService.getVideos({
+    const params = {
       videoPagination: newPagination,
       sort: this.sort,
       filter: this.filter,
       categoryOneOf: this.categoryOneOf,
       languageOneOf: this.languageOneOf
-    })
+    }
+
+    return this.hooks.wrapObsFun(
+      this.videoService.getVideos.bind(this.videoService),
+      params,
+      'common',
+      'filter:api.local-videos.videos.list.params',
+      'filter:api.local-videos.videos.list.result'
+    )
   }
 
   generateSyndicationList () {