]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/search/search.component.ts
Add setting helper to client plugins
[github/Chocobozzz/PeerTube.git] / client / src / app / search / search.component.ts
index b1d732d68d3b361e1da5d587188cc71ca610ce2e..5c4bb9379358f8efd5f8134b69316e989c17ef01 100644 (file)
@@ -11,6 +11,7 @@ import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
 import { immutableAssign } from '@app/shared/misc/utils'
 import { Video } from '@app/shared/video/video.model'
 import { HooksService } from '@app/core/plugins/hooks.service'
+import { PluginService } from '@app/core/plugins/plugin.service'
 
 @Component({
   selector: 'my-search',
@@ -43,7 +44,8 @@ export class SearchComponent implements OnInit, OnDestroy {
     private notifier: Notifier,
     private searchService: SearchService,
     private authService: AuthService,
-    private hooks: HooksService
+    private hooks: HooksService,
+    private pluginService: PluginService
   ) { }
 
   get user () {
@@ -75,6 +77,8 @@ export class SearchComponent implements OnInit, OnDestroy {
 
       err => this.notifier.error(err.text)
     )
+
+    this.hooks.runAction('action:search.init', 'search')
   }
 
   ngOnDestroy () {
@@ -175,7 +179,7 @@ export class SearchComponent implements OnInit, OnDestroy {
     return this.hooks.wrapObsFun(
       this.searchService.searchVideos.bind(this.searchService),
       params,
-      'common',
+      'search',
       'filter:api.search.videos.list.params',
       'filter:api.search.videos.list.result'
     )
@@ -190,7 +194,7 @@ export class SearchComponent implements OnInit, OnDestroy {
     return this.hooks.wrapObsFun(
       this.searchService.searchVideoChannels.bind(this.searchService),
       params,
-      'common',
+      'search',
       'filter:api.search.video-channels.list.params',
       'filter:api.search.video-channels.list.result'
     )