diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-29 13:53:56 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-29 13:53:56 -0500 |
| commit | 8c34f863fb6c6c282a87837138b3d620170099d8 (patch) | |
| tree | a3a44a3db87717e3c2eb37ea3528cf0227040dd2 /MediaBrowser.Api/Playback/BaseStreamingService.cs | |
| parent | 04d1a53d199bbf5fced102daae77b3ef0d64474d (diff) | |
make live tv channels playable
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 34ec15a70..1e2ae58b2 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -902,6 +902,22 @@ namespace MediaBrowser.Api.Playback item = recording; } + else if (string.Equals(request.Type, "Channel", StringComparison.OrdinalIgnoreCase)) + { + var channel = LiveTvManager.GetInternalChannel(request.Id); + + state.VideoType = VideoType.VideoFile; + state.IsInputVideo = string.Equals(channel.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase); + state.PlayableStreamFileNames = new List<string>(); + + state.MediaPath = string.Format("http://localhost:{0}/mediabrowser/LiveTv/Channels/{1}/Stream", + ServerConfigurationManager.Configuration.HttpServerPortNumber, + request.Id); + + state.IsRemote = true; + + item = channel; + } else { item = DtoService.GetItemByDtoId(request.Id); |
