mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 00:35:26 +03:00
Switched to MEF to register http handlers
This commit is contained in:
parent
a95e868300
commit
93b42641d2
@@ -1,17 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net.Handlers;
|
||||
using MediaBrowser.Common.Net.Handlers;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Model.DTO;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Api.HttpHandlers
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides information about installed plugins
|
||||
/// </summary>
|
||||
[Export(typeof(BaseHandler))]
|
||||
public class PluginsHandler : BaseSerializationHandler<IEnumerable<PluginInfo>>
|
||||
{
|
||||
public override bool HandlesRequest(HttpListenerRequest request)
|
||||
{
|
||||
return ApiService.IsApiUrlMatch("plugins", request);
|
||||
}
|
||||
|
||||
protected override Task<IEnumerable<PluginInfo>> GetObjectToSerialize()
|
||||
{
|
||||
var plugins = Kernel.Instance.Plugins.Select(p =>
|
||||
|
||||
Reference in New Issue
Block a user