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 FileStreamResponseHelpers.GetStaticFileResult(segmentPath, MimeTypes.GetMimeType(segmentPath), HttpContext);
return FileStreamResponseHelpers.GetStaticFileResult(segmentPath, MimeTypes.GetMimeType(segmentPath));
}
private long GetEndPositionTicks(StreamState state, int requestedIndex)

View File

@ -69,7 +69,7 @@ namespace Jellyfin.Api.Controllers
return BadRequest("Invalid segment.");
}
return FileStreamResponseHelpers.GetStaticFileResult(file, MimeTypes.GetMimeType(file), HttpContext);
return FileStreamResponseHelpers.GetStaticFileResult(file, MimeTypes.GetMimeType(file));
}
/// <summary>
@ -186,7 +186,7 @@ namespace Jellyfin.Api.Controllers
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(
state.MediaPath,
contentType,
HttpContext);
contentType);
}
// Need to start ffmpeg (because media can't be returned directly)

View File

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

View File

@ -51,12 +51,10 @@ namespace Jellyfin.Api.Helpers
/// </summary>
/// <param name="path">The path to 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>
public static ActionResult GetStaticFileResult(
string path,
string contentType,
HttpContext httpContext)
string contentType)
{
return new PhysicalFileResult(path, contentType) { EnableRangeProcessing = true };
}