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.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs
index d2574063b..68cfc9c44 100644
--- a/MediaBrowser.Api/LiveTv/LiveTvService.cs
+++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs
@@ -30,6 +30,18 @@ namespace MediaBrowser.Api.LiveTv
public string UserId { get; set; }
}
+ [Route("/LiveTv/Channels/{Id}", "GET")]
+ [Api(Description = "Gets a live tv channel")]
+ public class GetChannel : IReturn<ChannelInfoDto>
+ {
+ /// <summary>
+ /// Gets or sets the id.
+ /// </summary>
+ /// <value>The id.</value>
+ [ApiMember(Name = "Id", Description = "Channel Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
+ public string Id { get; set; }
+ }
+
[Route("/LiveTv/Recordings", "GET")]
[Api(Description = "Gets available live tv recordings.")]
public class GetRecordings : IReturn<List<RecordingInfo>>
@@ -101,6 +113,13 @@ namespace MediaBrowser.Api.LiveTv
return ToOptimizedResult(result.ToList());
}
+ public object Get(GetChannel request)
+ {
+ var result = _liveTvManager.GetChannel(request.Id);
+
+ return ToOptimizedResult(_liveTvManager.GetChannelInfoDto(result));
+ }
+
public object Get(GetRecordings request)
{
var result = GetRecordingsAsync(request).Result;