mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
Merge branch 'master' into keyframe_extraction_v1
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
subRip.LoadSubtitle(subtitle, lines, "untitled");
|
||||
if (subRip.ErrorCount > 0)
|
||||
{
|
||||
_logger.LogError("{ErrorCount} errors encountered while parsing subtitle.");
|
||||
_logger.LogError("{ErrorCount} errors encountered while parsing subtitle", subRip.ErrorCount);
|
||||
}
|
||||
|
||||
var trackInfo = new SubtitleTrackInfo();
|
||||
|
||||
@@ -680,7 +680,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
if (!string.Equals(text, newText, StringComparison.Ordinal))
|
||||
{
|
||||
// use FileShare.None as this bypasses dotnet bug dotnet/runtime#42790 .
|
||||
using (var fileStream = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None, IODefaults.FileStreamBufferSize, AsyncFile.UseAsyncIO))
|
||||
using (var fileStream = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous))
|
||||
using (var writer = new StreamWriter(fileStream, encoding))
|
||||
{
|
||||
await writer.WriteAsync(newText.AsMemory(), cancellationToken).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user