Add DLNA headers if requested by the client.

And remove the code which adds the headers as ResponseHelper.WriteToResponse
will do it.
pull/1568/head
Erik Larsson 5 years ago
parent 80145cd5a3
commit a1efe4caca

@ -690,8 +690,8 @@ namespace MediaBrowser.Api.Playback
request.AudioCodec = EncodingHelper.InferAudioCodec(url); request.AudioCodec = EncodingHelper.InferAudioCodec(url);
} }
var enableDlnaHeaders = !string.IsNullOrWhiteSpace(request.Params) /*|| var enableDlnaHeaders = !string.IsNullOrWhiteSpace(request.Params) ||
string.Equals(Request.Headers.Get("GetContentFeatures.DLNA.ORG"), "1", StringComparison.OrdinalIgnoreCase)*/; string.Equals(GetHeader("GetContentFeatures.DLNA.ORG"), "1", StringComparison.OrdinalIgnoreCase);
var state = new StreamState(MediaSourceManager, TranscodingJobType) var state = new StreamState(MediaSourceManager, TranscodingJobType)
{ {
@ -1016,11 +1016,6 @@ namespace MediaBrowser.Api.Playback
).FirstOrDefault() ?? string.Empty; ).FirstOrDefault() ?? string.Empty;
} }
foreach (var item in responseHeaders)
{
Request.Response.AddHeader(item.Key, item.Value);
}
} }
private void AddTimeSeekResponseHeaders(StreamState state, IDictionary<string, string> responseHeaders) private void AddTimeSeekResponseHeaders(StreamState state, IDictionary<string, string> responseHeaders)

Loading…
Cancel
Save