make live tv channels playable

This commit is contained in:
Luke Pulverenti
2013-12-29 13:53:56 -05:00
parent 04d1a53d19
commit 8c34f863fb
11 changed files with 61 additions and 42 deletions

View File

@@ -166,6 +166,15 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return await service.GetRecordingStream(recording.Id, cancellationToken).ConfigureAwait(false);
}
public async Task<StreamResponseInfo> GetChannelStream(string id, CancellationToken cancellationToken)
{
var service = ActiveService;
var channel = GetInternalChannel(id);
return await service.GetRecordingStream(channel.ChannelInfo.Id, cancellationToken).ConfigureAwait(false);
}
private async Task<LiveTvChannel> GetChannel(ChannelInfo channelInfo, string serviceName, CancellationToken cancellationToken)
{
var path = Path.Combine(_appPaths.ItemsByNamePath, "channels", _fileSystem.GetValidFilename(serviceName), _fileSystem.GetValidFilename(channelInfo.Name));