diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-09-29 22:21:24 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-09-29 22:21:24 -0400 |
| commit | fdbcccc65f5bd684b3a838f6cd835667391d9004 (patch) | |
| tree | 5672224d1e555b2c6f7c34e9d5558a14c2815515 /MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs | |
| parent | 76c7bfcb6795771cb06ef354fbf76d6e39de8948 (diff) | |
add infinite property
Diffstat (limited to 'MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs index 4bb62f47f..4adf6fbca 100644 --- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs +++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs @@ -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)) |
