diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2026-08-03 08:48:09 +0200 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2026-08-03 08:48:09 +0200 |
| commit | a272efb9a21720293199a0e3740f8529fd2abf46 (patch) | |
| tree | c0dbeec2807308ad6f7cf90ff7ddeb45c25651d2 /MediaBrowser.Common | |
| parent | 33a8cdfc0b77d7a2439aeb3472db5adda095b41b (diff) | |
Fix disabled plugins being re-enabled on restart
Diffstat (limited to 'MediaBrowser.Common')
| -rw-r--r-- | MediaBrowser.Common/Plugins/LocalPlugin.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Common/Plugins/LocalPlugin.cs b/MediaBrowser.Common/Plugins/LocalPlugin.cs index 4723be1001..221dda7d5f 100644 --- a/MediaBrowser.Common/Plugins/LocalPlugin.cs +++ b/MediaBrowser.Common/Plugins/LocalPlugin.cs @@ -73,6 +73,14 @@ namespace MediaBrowser.Common.Plugins public bool IsEnabledAndSupported => _supported && Manifest.Status >= PluginStatus.Active; /// <summary> + /// Gets or sets a value indicating whether a restart is required for the plugin's state to take effect. + /// </summary> + /// <remarks> + /// Memory only. <see cref="Manifest"/> holds the state that is persisted to disk. + /// </remarks> + public bool RestartRequired { get; set; } + + /// <summary> /// Gets a value indicating whether the plugin has a manifest. /// </summary> public PluginManifest Manifest { get; } @@ -108,7 +116,7 @@ namespace MediaBrowser.Common.Plugins public PluginInfo GetPluginInfo() { var inst = Instance?.GetPluginInfo() ?? new PluginInfo(Manifest.Name, Version, Manifest.Description, Manifest.Id, true); - inst.Status = Manifest.Status; + inst.Status = RestartRequired ? PluginStatus.Restart : Manifest.Status; inst.HasImage = !string.IsNullOrEmpty(Manifest.ImagePath) || !string.IsNullOrEmpty(Manifest.ImageResourceName); return inst; } |
