2012-08-14 16:06:46 +00:00
|
|
|
|
using System;
|
2012-08-15 13:20:29 +00:00
|
|
|
|
using MediaBrowser.Common.Net.Handlers;
|
2012-08-14 16:06:46 +00:00
|
|
|
|
using MediaBrowser.Controller;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Api.HttpHandlers
|
|
|
|
|
{
|
2012-08-15 13:20:29 +00:00
|
|
|
|
public class YearsHandler : BaseJsonHandler
|
2012-08-14 16:06:46 +00:00
|
|
|
|
{
|
2012-08-15 13:20:29 +00:00
|
|
|
|
protected override object GetObjectToSerialize()
|
2012-08-14 16:06:46 +00:00
|
|
|
|
{
|
2012-08-15 13:20:29 +00:00
|
|
|
|
Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;
|
|
|
|
|
Guid userId = Guid.Parse(QueryString["userid"]);
|
2012-08-14 16:06:46 +00:00
|
|
|
|
|
2012-08-15 13:20:29 +00:00
|
|
|
|
return Kernel.Instance.GetAllYears(parent, userId);
|
2012-08-14 16:06:46 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|