From 3b504f6ed4e890bebb46d0481aba15b43050323a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 10 Mar 2023 12:01:21 +0100 Subject: Add ability for plugins to alter video jsonld --- .../shared/metadata/video-attributes.component.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'client/src/app/+videos/+video-watch') diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts index ebfb42711..1834f7be5 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts @@ -22,11 +22,11 @@ export class VideoAttributesComponent implements OnInit { constructor (private hooks: HooksService) { } async ngOnInit () { - this.pluginMetadata = await this.hooks.wrapFunResult( - this.buildPluginMetadata.bind(this), - { video: this.video }, + this.pluginMetadata = await this.hooks.wrapObject( + this.pluginMetadata, 'video-watch', - 'filter:video-watch.video-plugin-metadata.result' + 'filter:video-watch.video-plugin-metadata.result', + { video: this.video } ) } @@ -39,11 +39,4 @@ export class VideoAttributesComponent implements OnInit { return this.video.tags } - - // Used for plugin hooks - private buildPluginMetadata (_options: { - video: VideoDetails - }): PluginMetadata[] { - return [] - } } -- cgit v1.2.3