|
|
@ -46,7 +46,15 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(targetFile) ?? throw new ArgumentException("Path can't be a root directory.", nameof(targetFile)));
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(targetFile) ?? throw new ArgumentException("Path can't be a root directory.", nameof(targetFile)));
|
|
|
|
|
|
|
|
|
|
|
|
await using (var output = new FileStream(targetFile, FileMode.CreateNew, FileAccess.Write, FileShare.Read, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous))
|
|
|
|
var output = new FileStream(
|
|
|
|
|
|
|
|
targetFile,
|
|
|
|
|
|
|
|
FileMode.CreateNew,
|
|
|
|
|
|
|
|
FileAccess.Write,
|
|
|
|
|
|
|
|
FileShare.Read,
|
|
|
|
|
|
|
|
IODefaults.FileStreamBufferSize,
|
|
|
|
|
|
|
|
FileOptions.Asynchronous);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await using (output.ConfigureAwait(false))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
onStarted();
|
|
|
|
onStarted();
|
|
|
|
|
|
|
|
|
|
|
@ -80,8 +88,9 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|
|
|
|
|
|
|
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(targetFile) ?? throw new ArgumentException("Path can't be a root directory.", nameof(targetFile)));
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(targetFile) ?? throw new ArgumentException("Path can't be a root directory.", nameof(targetFile)));
|
|
|
|
|
|
|
|
|
|
|
|
await using var output = new FileStream(targetFile, FileMode.CreateNew, FileAccess.Write, FileShare.Read, IODefaults.CopyToBufferSize, FileOptions.Asynchronous);
|
|
|
|
var output = new FileStream(targetFile, FileMode.CreateNew, FileAccess.Write, FileShare.Read, IODefaults.CopyToBufferSize, FileOptions.Asynchronous);
|
|
|
|
|
|
|
|
await using (output.ConfigureAwait(false))
|
|
|
|
|
|
|
|
{
|
|
|
|
onStarted();
|
|
|
|
onStarted();
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("Copying recording stream to file {0}", targetFile);
|
|
|
|
_logger.LogInformation("Copying recording stream to file {0}", targetFile);
|
|
|
@ -100,4 +109,5 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|
|
|
_logger.LogInformation("Recording completed to file {0}", targetFile);
|
|
|
|
_logger.LogInformation("Recording completed to file {0}", targetFile);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|