aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/ChapterService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-09 15:16:14 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-09 15:16:14 -0400
commit945e84327087c9e81371c7b4f940a19a0c083586 (patch)
tree0c4f4c2d4c048c3baf4acfe45a7caf8ff9fe931b /MediaBrowser.Api/Library/ChapterService.cs
parentba336372512e6366517a67e8b12677333266d032 (diff)
add new chapter provider feature
Diffstat (limited to 'MediaBrowser.Api/Library/ChapterService.cs')
-rw-r--r--MediaBrowser.Api/Library/ChapterService.cs28
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);
+ }
+ }
+}