diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-11-14 02:41:21 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-11-14 02:41:21 -0500 |
| commit | 2f758676d0908f07dafc3ec5434bbaf4cf82529c (patch) | |
| tree | 0e595cfe51829827a1bcd6f6dc20392ee3816794 /Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs | |
| parent | 2c6cbb33eead0236cbf89fb4afab486aa8510647 (diff) | |
support sharing m3u tuner streams
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs index cead1def03..bec92716bb 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs @@ -29,8 +29,9 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts public List<string> SharedStreamIds { get; private set; } protected readonly IEnvironmentInfo Environment; protected readonly IFileSystem FileSystem; + protected readonly IServerApplicationPaths AppPaths; - protected readonly string TempFilePath; + protected string TempFilePath; protected readonly ILogger Logger; protected readonly CancellationTokenSource LiveStreamCancellationTokenSource = new CancellationTokenSource(); @@ -44,7 +45,15 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts EnableStreamSharing = true; SharedStreamIds = new List<string>(); UniqueId = Guid.NewGuid().ToString("N"); - TempFilePath = Path.Combine(appPaths.GetTranscodingTempPath(), UniqueId + ".ts"); + + AppPaths = appPaths; + + SetTempFilePath("ts"); + } + + protected void SetTempFilePath(string extension) + { + TempFilePath = Path.Combine(AppPaths.GetTranscodingTempPath(), UniqueId + "." + extension); } public virtual Task Open(CancellationToken openCancellationToken) |
