mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #3871] [MERGED] Allow plugins to define their own api endpoints #9741
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/3871
Author: @daullmer
Created: 8/10/2020
Status: ✅ Merged
Merged: 8/31/2020
Merged by: @Bond-009
Base:
master← Head:plugins-api📝 Commits (6)
98d1d23Prepare plugin Api migration9e95fe8Add plugin assemblies to mvc builderd296a1fAdd logging, cleanup025ee21Change log message, load assembly only once7f79f2eUse .Distinct on assemblyb37cc7bDon't evaluate twice📊 Changes
4 files changed (+41 additions, -7 deletions)
View changed files
📝
Emby.Server.Implementations/ApplicationHost.cs(+15 -1)📝
Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs(+12 -4)📝
Jellyfin.Server/Startup.cs(+7 -2)📝
MediaBrowser.Common/IApplicationHost.cs(+7 -0)📄 Description
Changes
To allow plugins to register their own ASP.NET Web Api endpoints, we need to register each assembly in the
MvcBuilder.However, this is currently not possible, asapplicationHost.Pluginsdoesn't contain the plugins. They get loaded afterStartup.ConfigureServicesran.Can we load the plugins earlier? I tried to move some things around (calling this line before calling this line) but
InitializeServicesneeds theappHost.ServiceProviderwhich we get from the WebHostBuilder.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.