mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
removed plugin configuration pages from the kernel
This commit is contained in:
parent
bf95cfe2e5
commit
176d090164
@ -74,12 +74,6 @@ namespace MediaBrowser.Controller
|
|||||||
/// <value>The string files.</value>
|
/// <value>The string files.</value>
|
||||||
public IEnumerable<LocalizedStringData> StringFiles { get; private set; }
|
public IEnumerable<LocalizedStringData> StringFiles { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the list of plugin configuration pages
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The configuration pages.</value>
|
|
||||||
public IEnumerable<IPluginConfigurationPage> PluginConfigurationPages { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the list of currently registered weather prvoiders
|
/// Gets the list of currently registered weather prvoiders
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -204,7 +198,6 @@ namespace MediaBrowser.Controller
|
|||||||
DisplayPreferencesRepositories = ApplicationHost.GetExports<IDisplayPreferencesRepository>();
|
DisplayPreferencesRepositories = ApplicationHost.GetExports<IDisplayPreferencesRepository>();
|
||||||
ItemRepositories = ApplicationHost.GetExports<IItemRepository>();
|
ItemRepositories = ApplicationHost.GetExports<IItemRepository>();
|
||||||
WeatherProviders = ApplicationHost.GetExports<IWeatherProvider>();
|
WeatherProviders = ApplicationHost.GetExports<IWeatherProvider>();
|
||||||
PluginConfigurationPages = ApplicationHost.GetExports<IPluginConfigurationPage>();
|
|
||||||
ImageEnhancers = ApplicationHost.GetExports<IImageEnhancer>().OrderBy(e => e.Priority).ToArray();
|
ImageEnhancers = ApplicationHost.GetExports<IImageEnhancer>().OrderBy(e => e.Priority).ToArray();
|
||||||
StringFiles = ApplicationHost.GetExports<LocalizedStringData>();
|
StringFiles = ApplicationHost.GetExports<LocalizedStringData>();
|
||||||
MetadataProviders = ApplicationHost.GetExports<BaseMetadataProvider>().OrderBy(e => e.Priority).ToArray();
|
MetadataProviders = ApplicationHost.GetExports<BaseMetadataProvider>().OrderBy(e => e.Priority).ToArray();
|
||||||
|
@ -14,7 +14,7 @@ namespace MediaBrowser.ServerApplication
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class WebSocketEvents
|
/// Class WebSocketEvents
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class WebSocketEvents : IServerEntryPoint, IDisposable
|
public class WebSocketEvents : IServerEntryPoint
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _server manager
|
/// The _server manager
|
||||||
|
@ -147,7 +147,7 @@ namespace MediaBrowser.WebDashboard.Api
|
|||||||
/// <returns>System.Object.</returns>
|
/// <returns>System.Object.</returns>
|
||||||
public object Get(GetDashboardConfigurationPage request)
|
public object Get(GetDashboardConfigurationPage request)
|
||||||
{
|
{
|
||||||
var page = Kernel.Instance.PluginConfigurationPages.First(p => p.Name.Equals(request.Name, StringComparison.OrdinalIgnoreCase));
|
var page = ServerEntryPoint.Instance.PluginConfigurationPages.First(p => p.Name.Equals(request.Name, StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
return ToStaticResult(page.Version.GetMD5(), page.DateLastModified, null, MimeTypes.GetMimeType("page.html"), () => ModifyHtml(page.GetHtmlStream()));
|
return ToStaticResult(page.Version.GetMD5(), page.DateLastModified, null, MimeTypes.GetMimeType("page.html"), () => ModifyHtml(page.GetHtmlStream()));
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ namespace MediaBrowser.WebDashboard.Api
|
|||||||
/// <returns>System.Object.</returns>
|
/// <returns>System.Object.</returns>
|
||||||
public object Get(GetDashboardConfigurationPages request)
|
public object Get(GetDashboardConfigurationPages request)
|
||||||
{
|
{
|
||||||
var pages = Kernel.Instance.PluginConfigurationPages;
|
var pages = ServerEntryPoint.Instance.PluginConfigurationPages;
|
||||||
|
|
||||||
if (request.PageType.HasValue)
|
if (request.PageType.HasValue)
|
||||||
{
|
{
|
||||||
|
@ -85,6 +85,7 @@
|
|||||||
<Compile Include="Api\DashboardService.cs" />
|
<Compile Include="Api\DashboardService.cs" />
|
||||||
<Compile Include="Api\DashboardInfoWebSocketListener.cs" />
|
<Compile Include="Api\DashboardInfoWebSocketListener.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="ServerEntryPoint.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\MediaBrowser.Common.Implementations\MediaBrowser.Common.Implementations.csproj">
|
<ProjectReference Include="..\MediaBrowser.Common.Implementations\MediaBrowser.Common.Implementations.csproj">
|
||||||
|
34
MediaBrowser.WebDashboard/ServerEntryPoint.cs
Normal file
34
MediaBrowser.WebDashboard/ServerEntryPoint.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
using MediaBrowser.Common;
|
||||||
|
using MediaBrowser.Controller.Plugins;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace MediaBrowser.WebDashboard
|
||||||
|
{
|
||||||
|
public class ServerEntryPoint : IServerEntryPoint
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the list of plugin configuration pages
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The configuration pages.</value>
|
||||||
|
public IEnumerable<IPluginConfigurationPage> PluginConfigurationPages { get; private set; }
|
||||||
|
|
||||||
|
private readonly IApplicationHost _appHost;
|
||||||
|
|
||||||
|
public static ServerEntryPoint Instance { get; private set; }
|
||||||
|
|
||||||
|
public ServerEntryPoint(IApplicationHost appHost)
|
||||||
|
{
|
||||||
|
_appHost = appHost;
|
||||||
|
Instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Run()
|
||||||
|
{
|
||||||
|
PluginConfigurationPages = _appHost.GetExports<IPluginConfigurationPage>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user