[PR #6124] [CLOSED] Fix: Plugin implementing IServerEntryPoint and IBasePlugin gets instantiated TWICE. #10830

Closed
opened 2026-02-07 06:27:28 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/6124
Author: @BaronGreenback
Created: 5/29/2021
Status: Closed

Base: masterHead: IServerEntryHost_IPlugin_Dual_Instance


📝 Commits (1)

  • 2771477 Fix for multiple instances created,

📊 Changes

1 file changed (+14 additions, -1 deletions)

View changed files

📝 Emby.Server.Implementations/ApplicationHost.cs (+14 -1)

📄 Description

Issue:

If a plugin implements both the IServerEntryPoint and IBasePlugin interfaces it is currently instantiated twice, once as a plugin, and again as a IServerEntryPoint.

This change only creates a new instance if it hasn't already been instantiated in the plugin creation stage, otherwise the plugin generated instance is used.

The current workaround is to create two classes, one a IBasePlugin, and the other a IServerEntryPoint. With this change, only one class is required.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/6124 **Author:** [@BaronGreenback](https://github.com/BaronGreenback) **Created:** 5/29/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `IServerEntryHost_IPlugin_Dual_Instance` --- ### 📝 Commits (1) - [`2771477`](https://github.com/jellyfin/jellyfin/commit/27714776d5104ae0ea9299f883e26bd01ec8b834) Fix for multiple instances created, ### 📊 Changes **1 file changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/ApplicationHost.cs` (+14 -1) </details> ### 📄 Description **Issue:** If a plugin implements both the IServerEntryPoint and IBasePlugin<T> interfaces it is currently **instantiated twice**, once as a plugin, and again as a IServerEntryPoint. This change only creates a new instance if it hasn't already been instantiated in the plugin creation stage, otherwise the plugin generated instance is used. The current workaround is to create two classes, one a IBasePlugin, and the other a IServerEntryPoint. With this change, only one class is required. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:27:28 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10830