aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/LiveTv/LiveTvService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/LiveTv/LiveTvService.cs')
-rw-r--r--MediaBrowser.Api/LiveTv/LiveTvService.cs22
1 files changed, 21 insertions, 1 deletions
diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs
index ae9c79c0e..84bd291a4 100644
--- a/MediaBrowser.Api/LiveTv/LiveTvService.cs
+++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs
@@ -68,7 +68,7 @@ namespace MediaBrowser.Api.LiveTv
[Route("/LiveTv/Recordings/Groups", "GET")]
[Api(Description = "Gets live tv recording groups")]
- public class GetRecordingGroups : IReturn<QueryResult<RecordingInfoDto>>
+ public class GetRecordingGroups : IReturn<QueryResult<RecordingGroupDto>>
{
[ApiMember(Name = "UserId", Description = "Optional filter by user and attach user data.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public string UserId { get; set; }
@@ -208,6 +208,14 @@ namespace MediaBrowser.Api.LiveTv
public string Id { get; set; }
}
+ [Route("/LiveTv/Recordings/Groups/{Id}", "GET")]
+ [Api(Description = "Gets a recording group")]
+ public class GetRecordingGroup : IReturn<RecordingGroupDto>
+ {
+ [ApiMember(Name = "Id", Description = "Recording group Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
+ public string Id { get; set; }
+ }
+
public class LiveTvService : BaseApiService
{
private readonly ILiveTvManager _liveTvManager;
@@ -427,5 +435,17 @@ namespace MediaBrowser.Api.LiveTv
return ToOptimizedResult(result);
}
+
+ public object Get(GetRecordingGroup request)
+ {
+ var result = _liveTvManager.GetRecordingGroups(new RecordingGroupQuery
+ {
+
+ }, CancellationToken.None).Result;
+
+ var group = result.Items.FirstOrDefault(i => string.Equals(i.Id, request.Id, StringComparison.OrdinalIgnoreCase));
+
+ return ToOptimizedResult(group);
+ }
}
} \ No newline at end of file