Merge pull request #8144 from joseph39/ffmpeg-referer
This commit is contained in:
commit
43ec8e9743
|
@ -256,6 +256,21 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the referer param.
|
||||
/// </summary>
|
||||
/// <param name="state">The state.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public string GetRefererParam(EncodingJobInfo state)
|
||||
{
|
||||
if (state.RemoteHttpHeaders.TryGetValue("Referer", out string referer))
|
||||
{
|
||||
return "-referer \"" + referer + "\"";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public static string GetInputFormat(string container)
|
||||
{
|
||||
if (string.IsNullOrEmpty(container))
|
||||
|
@ -5001,6 +5016,15 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
|
||||
inputModifier = inputModifier.Trim();
|
||||
|
||||
var refererParam = GetRefererParam(state);
|
||||
|
||||
if (!string.IsNullOrEmpty(refererParam))
|
||||
{
|
||||
inputModifier += " " + refererParam;
|
||||
}
|
||||
|
||||
inputModifier = inputModifier.Trim();
|
||||
|
||||
inputModifier += " " + GetFastSeekCommandLineParameter(state, encodingOptions, segmentContainer);
|
||||
inputModifier = inputModifier.Trim();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user