2014-06-09 21:16:14 +02:00
|
|
|
|
using MediaBrowser.Controller.Chapters;
|
2014-07-02 20:34:08 +02:00
|
|
|
|
using MediaBrowser.Controller.Net;
|
2014-06-09 21:16:14 +02:00
|
|
|
|
using ServiceStack;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Api.Library
|
|
|
|
|
{
|
|
|
|
|
[Route("/Providers/Chapters", "GET")]
|
|
|
|
|
public class GetChapterProviders : IReturnVoid
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-02 20:34:08 +02:00
|
|
|
|
[Authenticated]
|
2014-06-09 21:16:14 +02:00
|
|
|
|
public class ChapterService : BaseApiService
|
|
|
|
|
{
|
|
|
|
|
private readonly IChapterManager _chapterManager;
|
|
|
|
|
|
|
|
|
|
public ChapterService(IChapterManager chapterManager)
|
|
|
|
|
{
|
|
|
|
|
_chapterManager = chapterManager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object Get(GetChapterProviders request)
|
|
|
|
|
{
|
|
|
|
|
var result = _chapterManager.GetProviders().ToList();
|
|
|
|
|
|
|
|
|
|
return ToOptimizedResult(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|