aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-09-18 12:52:22 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-09-18 12:52:22 -0400
commitcdd79ec7e2fcea806be7a9b50764b1ad473d5970 (patch)
tree07ac58ea57e5750c0749de219220e9635c8fea27 /Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
parentb01489c40fbd0aa6013f1ed448d902094a186f9f (diff)
update owned items
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs')
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
index 2a2e1886f6..f0578d9efb 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
@@ -42,6 +42,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
private async Task RecordFromDirectStreamProvider(IDirectStreamProvider directStreamProvider, string targetFile, TimeSpan duration, Action onStarted, CancellationToken cancellationToken)
{
+ _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(targetFile));
+
using (var output = _fileSystem.GetFileStream(targetFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read))
{
onStarted();
@@ -76,6 +78,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
_logger.Info("Opened recording stream from tuner provider");
+ _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(targetFile));
+
using (var output = _fileSystem.GetFileStream(targetFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read))
{
onStarted();