Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Update config after plugin settings changes

Chocobozzz6a51b685ef23
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
index fb75b7c43c..e8a3c965ec 100644
--- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
+++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
@@ -2,7 +2,7 @@ import { Subscription } from 'rxjs'
import { map, switchMap } from 'rxjs/operators'
import { Component, OnDestroy, OnInit, inject } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
-import { HooksService, Notifier, PluginService } from '@app/core'
+import { HooksService, Notifier, PluginService, ServerService } from '@app/core'
import { FormReactive } from '@app/shared/shared-forms/form-reactive'
import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { PeerTubePlugin, RegisterServerSettingOptions } from '@peertube/peertube-models'
@@ -24,6 +24,7 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit
private notifier = inject(Notifier)
private hooks = inject(HooksService)
private route = inject(ActivatedRoute)
+ private server = inject(ServerService)
plugin: PeerTubePlugin
registeredSettings: RegisterServerSettingOptions[] = []
@@ -50,6 +51,7 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit
const settings = this.form.value
this.pluginAPIService.updatePluginSettings(this.plugin.name, this.plugin.type, settings)
+ .pipe(switchMap(() => this.server.resetConfig()))
.subscribe({
next: () => {
this.notifier.success($localize`Settings updated.`)