add infinite property

This commit is contained in:
Luke Pulverenti
2016-09-29 22:21:24 -04:00
parent 76c7bfcb67
commit fdbcccc65f
4 changed files with 22 additions and 3 deletions

View File

@@ -170,6 +170,19 @@ namespace MediaBrowser.Api.Playback.Progressive
using (state)
{
if (state.MediaSource.IsInfiniteStream)
{
var outputHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
outputHeaders["Content-Type"] = contentType;
var streamSource = new ProgressiveFileCopier(FileSystem, state.MediaPath, outputHeaders, null, Logger, CancellationToken.None)
{
AllowEndOfFile = false
};
return ResultFactory.GetAsyncStreamWriter(streamSource);
}
TimeSpan? cacheDuration = null;
if (!string.IsNullOrEmpty(request.Tag))