mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 16:54:46 +03:00
Switched to MEF to register http handlers
This commit is contained in:
parent
a95e868300
commit
93b42641d2
@@ -4,7 +4,9 @@ using MediaBrowser.Model.DTO;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Api.HttpHandlers
|
||||
@@ -12,8 +14,14 @@ namespace MediaBrowser.Api.HttpHandlers
|
||||
/// <summary>
|
||||
/// Gets a single studio
|
||||
/// </summary>
|
||||
[Export(typeof(BaseHandler))]
|
||||
public class StudioHandler : BaseSerializationHandler<IBNItem>
|
||||
{
|
||||
public override bool HandlesRequest(HttpListenerRequest request)
|
||||
{
|
||||
return ApiService.IsApiUrlMatch("studio", request);
|
||||
}
|
||||
|
||||
protected override Task<IBNItem> GetObjectToSerialize()
|
||||
{
|
||||
Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;
|
||||
|
||||
Reference in New Issue
Block a user