Merge pull request #2025 from softworkz/AsyncStreamInterface

Async stream handling: Use interface instead of Func<Stream,Task>
This commit is contained in:
Luke
2016-08-15 17:59:28 -04:00
committed by GitHub
8 changed files with 64 additions and 25 deletions

View File

@@ -370,9 +370,9 @@ namespace MediaBrowser.Api.Playback.Progressive
outputHeaders[item.Key] = item.Value;
}
Func<Stream, Task> streamWriter = stream => new ProgressiveFileCopier(FileSystem, job, Logger).StreamFile(outputPath, stream, CancellationToken.None);
var streamSource = new ProgressiveFileCopier(FileSystem, outputPath, outputHeaders, job, Logger, CancellationToken.None);
return ResultFactory.GetAsyncStreamWriter(streamWriter, outputHeaders);
return ResultFactory.GetAsyncStreamWriter(streamSource);
}
finally
{