2012-07-16 16:50:44 +00:00
|
|
|
|
using System;
|
|
|
|
|
using MediaBrowser.Common.Net;
|
2012-07-13 03:50:50 +00:00
|
|
|
|
using MediaBrowser.Common.Net.Handlers;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Api.HttpHandlers
|
|
|
|
|
{
|
|
|
|
|
public class GenresHandler : JsonHandler
|
|
|
|
|
{
|
|
|
|
|
public GenresHandler(RequestContext ctx)
|
|
|
|
|
: base(ctx)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected sealed override object ObjectToSerialize
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;
|
2012-07-16 16:50:44 +00:00
|
|
|
|
Guid userId = Guid.Parse(QueryString["userid"]);
|
2012-07-13 03:50:50 +00:00
|
|
|
|
|
2012-07-16 16:50:44 +00:00
|
|
|
|
return ApiService.GetAllGenres(parent, userId);
|
2012-07-13 03:50:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|