mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-11-05 13:45:53 +00:00
remove standard output redirect on image extractions
This commit is contained in:
1 parent
580a68d19c
commit
00634b62c5
6 files changed
+41
-45
No files matched your search
@@ -139,12 +139,16 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
using (var stream = await _encoder.ExtractVideoImage(inputPath, protocol, video.Video3DFormat, time, cancellationToken).ConfigureAwait(false))
|
||||
var tempFile = await _encoder.ExtractVideoImage(inputPath, protocol, video.Video3DFormat, time, cancellationToken).ConfigureAwait(false);
|
||||
File.Copy(tempFile, path, true);
|
||||
|
||||
try
|
||||
{
|
||||
using (var fileStream = _fileSystem.GetFileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read, true))
|
||||
{
|
||||
await stream.CopyToAsync(fileStream).ConfigureAwait(false);
|
||||
}
|
||||
File.Delete(tempFile);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
chapter.ImagePath = path;
|
||||
|
||||
Reference in new issue
Block a user