jellyfin/MediaBrowser.Api/HttpHandlers/ItemHandler.cs

27 lines
638 B
C#
Raw Normal View History

using System;
2012-07-12 06:55:27 +00:00
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Api.HttpHandlers
{
public class ItemHandler : JsonHandler
2012-07-12 06:55:27 +00:00
{
protected sealed override object ObjectToSerialize
2012-07-12 06:55:27 +00:00
{
get
{
Guid userId = Guid.Parse(QueryString["userid"]);
return ApiService.GetSerializationObject(ItemToSerialize, true, userId);
2012-07-12 06:55:27 +00:00
}
}
protected virtual BaseItem ItemToSerialize
2012-07-12 06:55:27 +00:00
{
get
2012-07-12 06:55:27 +00:00
{
return ApiService.GetItemById(QueryString["id"]);
2012-07-12 06:55:27 +00:00
}
}
}
}