aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-12-06 12:06:13 +0100
committerBond-009 <bond.009@outlook.com>2019-12-06 12:06:13 +0100
commita2c35e6dba02f068a3f06e5a4e4964e6539069d1 (patch)
treee75984ab85fedceaf96150ad9d5241cf88230a60 /MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
parent94edb5b9f98cf3b06144255eccc988712332f0a8 (diff)
parent935525e77a18061195dea786be71d38fffe82a10 (diff)
Merge remote-tracking branch 'upstream/master' into random
Diffstat (limited to 'MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs')
-rw-r--r--MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs b/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
index 6a2c7ae03..ca5a73ff1 100644
--- a/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
+++ b/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
@@ -2,7 +2,7 @@ using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
-using MediaBrowser.Controller;
+using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Controller.Net;
@@ -83,13 +83,11 @@ namespace MediaBrowser.Api.Playback.Hls
public class HlsSegmentService : BaseApiService
{
- private readonly IServerApplicationPaths _appPaths;
private readonly IServerConfigurationManager _config;
private readonly IFileSystem _fileSystem;
- public HlsSegmentService(IServerApplicationPaths appPaths, IServerConfigurationManager config, IFileSystem fileSystem)
+ public HlsSegmentService(IServerConfigurationManager config, IFileSystem fileSystem)
{
- _appPaths = appPaths;
_config = config;
_fileSystem = fileSystem;
}
@@ -97,7 +95,7 @@ namespace MediaBrowser.Api.Playback.Hls
public Task<object> Get(GetHlsPlaylistLegacy request)
{
var file = request.PlaylistId + Path.GetExtension(Request.PathInfo);
- file = Path.Combine(_appPaths.TranscodingTempPath, file);
+ file = Path.Combine(_config.GetTranscodePath(), file);
return GetFileResult(file, file);
}
@@ -115,8 +113,7 @@ namespace MediaBrowser.Api.Playback.Hls
public Task<object> Get(GetHlsVideoSegmentLegacy request)
{
var file = request.SegmentId + Path.GetExtension(Request.PathInfo);
-
- var transcodeFolderPath = _config.ApplicationPaths.TranscodingTempPath;
+ var transcodeFolderPath = _config.GetTranscodePath();
file = Path.Combine(transcodeFolderPath, file);
var normalizedPlaylistId = request.PlaylistId;
@@ -136,7 +133,7 @@ namespace MediaBrowser.Api.Playback.Hls
{
// TODO: Deprecate with new iOS app
var file = request.SegmentId + Path.GetExtension(Request.PathInfo);
- file = Path.Combine(_appPaths.TranscodingTempPath, file);
+ file = Path.Combine(_config.GetTranscodePath(), file);
return ResultFactory.GetStaticFileResult(Request, file, FileShareMode.ReadWrite);
}