diff options
| author | bugfixin <steve@bugfix.in> | 2019-04-25 19:14:33 +0000 |
|---|---|---|
| committer | bugfixin <steve@bugfix.in> | 2019-04-25 19:14:33 +0000 |
| commit | a827a2fbccd0532631f4de849e18a9eeff772b5d (patch) | |
| tree | f051524d9ae21296e0f9f60a950b5f30c4e474db | |
| parent | f97f6b8061a4127d5a18c6a132e546ed424f88c7 (diff) | |
Remove unreachable code and const trySupportSeek within BaseProgressiveStreamingService
| -rw-r--r-- | MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs index 1c36289c5..83a3f3e3c 100644 --- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs +++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs @@ -283,8 +283,6 @@ namespace MediaBrowser.Api.Playback.Progressive { state.RemoteHttpHeaders.TryGetValue(HeaderNames.UserAgent, out var useragent); - const bool trySupportSeek = false; - var options = new HttpRequestOptions { Url = state.MediaPath, @@ -293,30 +291,9 @@ namespace MediaBrowser.Api.Playback.Progressive CancellationToken = cancellationTokenSource.Token }; - if (trySupportSeek) - { - if (!string.IsNullOrWhiteSpace(Request.QueryString[HeaderNames.Range])) - { - options.RequestHeaders[HeaderNames.Range] = Request.QueryString[HeaderNames.Range]; - } - } var response = await HttpClient.GetResponse(options).ConfigureAwait(false); - if (trySupportSeek) - { - foreach (var name in new[] { HeaderNames.ContentRange, HeaderNames.AcceptRanges }) - { - var val = response.Headers[name]; - if (!string.IsNullOrWhiteSpace(val)) - { - responseHeaders[name] = val; - } - } - } - else - { - responseHeaders[HeaderNames.AcceptRanges] = "none"; - } + responseHeaders[HeaderNames.AcceptRanges] = "none"; // Seeing cases of -1 here if (response.ContentLength.HasValue && response.ContentLength.Value >= 0) |
