Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
EraYaN committed Mar 20, 2021
1 parent 470305f commit 1f3aa3f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Jellyfin.Api/Controllers/HlsSegmentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public ActionResult GetHlsAudioSegmentLegacy([FromRoute, Required] string itemId
{
// TODO: Deprecate with new iOS app
var file = segmentId + Path.GetExtension(Request.Path);
file = Path.Combine(_serverConfigurationManager.GetTranscodePath(), file);
var transcodePath = _serverConfigurationManager.GetTranscodePath();
file = Path.GetFullPath(Path.Combine(transcodePath, file));
var fileDir = Path.GetDirectoryName(file);
Expand All @@ -88,7 +87,6 @@ public ActionResult GetHlsAudioSegmentLegacy([FromRoute, Required] string itemId
public ActionResult GetHlsPlaylistLegacy([FromRoute, Required] string itemId, [FromRoute, Required] string playlistId)
{
var file = playlistId + Path.GetExtension(Request.Path);
file = Path.Combine(_serverConfigurationManager.GetTranscodePath(), file);
var transcodePath = _serverConfigurationManager.GetTranscodePath();
file = Path.GetFullPath(Path.Combine(transcodePath, file));
var fileDir = Path.GetDirectoryName(file);
Expand Down Expand Up @@ -144,7 +142,6 @@ public ActionResult GetHlsPlaylistLegacy([FromRoute, Required] string itemId, [F
var file = segmentId + Path.GetExtension(Request.Path);
var transcodeFolderPath = _serverConfigurationManager.GetTranscodePath();

file = Path.Combine(transcodeFolderPath, file);
file = Path.GetFullPath(Path.Combine(transcodeFolderPath, file));
var fileDir = Path.GetDirectoryName(file);
if (string.IsNullOrEmpty(fileDir) || !fileDir.StartsWith(transcodeFolderPath))
Expand Down

0 comments on commit 1f3aa3f

Please sign in to comment.