aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ItemLookupController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Controllers/ItemLookupController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ItemLookupController.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/ItemLookupController.cs b/Jellyfin.Api/Controllers/ItemLookupController.cs
index 6c38f77ce..dabd4deb7 100644
--- a/Jellyfin.Api/Controllers/ItemLookupController.cs
+++ b/Jellyfin.Api/Controllers/ItemLookupController.cs
@@ -2,8 +2,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
-using System.Linq;
-using System.Net.Mime;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
@@ -346,11 +344,12 @@ namespace Jellyfin.Api.Controllers
Directory.CreateDirectory(directory);
using (var stream = result.Content)
{
+ // use FileShare.None as this bypasses dotnet bug dotnet/runtime#42790 .
await using var fileStream = new FileStream(
fullCachePath,
FileMode.Create,
FileAccess.Write,
- FileShare.Read,
+ FileShare.None,
IODefaults.FileStreamBufferSize,
true);