mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 13:10:45 +02:00
36 lines
804 B
C#
36 lines
804 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
namespace MediaBrowser.Api.HttpHandlers
|
|
{
|
|
public abstract class ItemListHandler : JsonHandler
|
|
{
|
|
protected sealed override object ObjectToSerialize
|
|
{
|
|
get
|
|
{
|
|
return ItemsToSerialize.Select(i =>
|
|
{
|
|
return ApiService.GetSerializationObject(i, false, UserId);
|
|
|
|
});
|
|
}
|
|
}
|
|
|
|
protected abstract IEnumerable<BaseItem> ItemsToSerialize
|
|
{
|
|
get;
|
|
}
|
|
|
|
protected Guid UserId
|
|
{
|
|
get
|
|
{
|
|
return Guid.Parse(QueryString["userid"]);
|
|
}
|
|
}
|
|
}
|
|
}
|