Remove unused httpContext parameter

This commit is contained in:
SenorSmartyPants 2022-01-08 19:53:53 -06:00
parent 3ea54a8009
commit d5e7e75421
5 changed files with 6 additions and 10 deletions

View File

@ -1954,7 +1954,7 @@ namespace Jellyfin.Api.Controllers
return Task.CompletedTask; return Task.CompletedTask;
}); });
return FileStreamResponseHelpers.GetStaticFileResult(segmentPath, MimeTypes.GetMimeType(segmentPath), HttpContext); return FileStreamResponseHelpers.GetStaticFileResult(segmentPath, MimeTypes.GetMimeType(segmentPath));
} }
private long GetEndPositionTicks(StreamState state, int requestedIndex) private long GetEndPositionTicks(StreamState state, int requestedIndex)

View File

@ -69,7 +69,7 @@ namespace Jellyfin.Api.Controllers
return BadRequest("Invalid segment."); return BadRequest("Invalid segment.");
} }
return FileStreamResponseHelpers.GetStaticFileResult(file, MimeTypes.GetMimeType(file), HttpContext); return FileStreamResponseHelpers.GetStaticFileResult(file, MimeTypes.GetMimeType(file));
} }
/// <summary> /// <summary>
@ -186,7 +186,7 @@ namespace Jellyfin.Api.Controllers
return Task.CompletedTask; return Task.CompletedTask;
}); });
return FileStreamResponseHelpers.GetStaticFileResult(path, MimeTypes.GetMimeType(path), HttpContext); return FileStreamResponseHelpers.GetStaticFileResult(path, MimeTypes.GetMimeType(path));
} }
} }
} }

View File

@ -499,8 +499,7 @@ namespace Jellyfin.Api.Controllers
return FileStreamResponseHelpers.GetStaticFileResult( return FileStreamResponseHelpers.GetStaticFileResult(
state.MediaPath, state.MediaPath,
contentType, contentType);
HttpContext);
} }
// Need to start ffmpeg (because media can't be returned directly) // Need to start ffmpeg (because media can't be returned directly)

View File

@ -167,8 +167,7 @@ namespace Jellyfin.Api.Helpers
return FileStreamResponseHelpers.GetStaticFileResult( return FileStreamResponseHelpers.GetStaticFileResult(
state.MediaPath, state.MediaPath,
contentType, contentType);
_httpContextAccessor.HttpContext);
} }
// Need to start ffmpeg (because media can't be returned directly) // Need to start ffmpeg (because media can't be returned directly)

View File

@ -51,12 +51,10 @@ namespace Jellyfin.Api.Helpers
/// </summary> /// </summary>
/// <param name="path">The path to the file.</param> /// <param name="path">The path to the file.</param>
/// <param name="contentType">The content type of the file.</param> /// <param name="contentType">The content type of the file.</param>
/// <param name="httpContext">The current http context.</param>
/// <returns>An <see cref="ActionResult"/> the file.</returns> /// <returns>An <see cref="ActionResult"/> the file.</returns>
public static ActionResult GetStaticFileResult( public static ActionResult GetStaticFileResult(
string path, string path,
string contentType, string contentType)
HttpContext httpContext)
{ {
return new PhysicalFileResult(path, contentType) { EnableRangeProcessing = true }; return new PhysicalFileResult(path, contentType) { EnableRangeProcessing = true };
} }