Add DLNA headers if requested by the client.

And remove the code which adds the headers as ResponseHelper.WriteToResponse
will do it.
This commit is contained in:
Erik Larsson 2019-07-27 19:55:18 +02:00
parent 80145cd5a3
commit a1efe4caca

View File

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