diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-06-09 15:16:14 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-06-09 15:16:14 -0400 |
| commit | 945e84327087c9e81371c7b4f940a19a0c083586 (patch) | |
| tree | 0c4f4c2d4c048c3baf4acfe45a7caf8ff9fe931b /MediaBrowser.Api/Library/ChapterService.cs | |
| parent | ba336372512e6366517a67e8b12677333266d032 (diff) | |
add new chapter provider feature
Diffstat (limited to 'MediaBrowser.Api/Library/ChapterService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/ChapterService.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Library/ChapterService.cs b/MediaBrowser.Api/Library/ChapterService.cs new file mode 100644 index 000000000..72ffa3fca --- /dev/null +++ b/MediaBrowser.Api/Library/ChapterService.cs @@ -0,0 +1,28 @@ +using MediaBrowser.Controller.Chapters; +using ServiceStack; +using System.Linq; + +namespace MediaBrowser.Api.Library +{ + [Route("/Providers/Chapters", "GET")] + public class GetChapterProviders : IReturnVoid + { + } + + 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); + } + } +} |
