Handle null outputFileExtension with null-conditional operator

pull/2849/head
Matt Lyons 5 years ago committed by GitHub
parent b52199e9e2
commit e7fde6aaca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -131,12 +131,10 @@ namespace MediaBrowser.Api.Playback
/// </summary>
private string GetOutputFilePath(StreamState state, EncodingOptions encodingOptions, string outputFileExtension)
{
if (outputFileExtension == null) outputFileExtension = "";
var data = $"{state.MediaPath}-{state.UserAgent}-{state.Request.DeviceId}-{state.Request.PlaySessionId}";
var filename = data.GetMD5().ToString("N", CultureInfo.InvariantCulture);
var ext = outputFileExtension.ToLowerInvariant();
var ext = outputFileExtension?.ToLowerInvariant();
var folder = ServerConfigurationManager.GetTranscodePath();
return EnableOutputInSubFolder

Loading…
Cancel
Save