jellyfin-server/MediaBrowser.Api/HttpHandlers/GenreHandler.cs
LukePulverenti Luke Pulverenti luke pulverenti 5f5f2838b1 moved the http server to common, added more http handlers
2012-07-12 23:50:50 -04:00

29 lines
726 B
C#

using System.Collections.Generic;
using MediaBrowser.Common.Net;
using MediaBrowser.Model.Entities;
using MediaBrowser.Api;
namespace MediaBrowser.Api.HttpHandlers
{
/// <summary>
/// Gets all items within a Genre
/// </summary>
public class GenreHandler : ItemListHandler
{
public GenreHandler(RequestContext ctx)
: base(ctx)
{
}
protected override IEnumerable<BaseItem> ItemsToSerialize
{
get
{
Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;
return ApiService.GetItemsWithGenre(parent, QueryString["name"]);
}
}
}
}