mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
use proper os comparison
This commit is contained in:
parent
b8d327889b
commit
03f15fc0ef
@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Api.Models.PlaybackDtos;
|
||||
@ -82,7 +84,7 @@ namespace Jellyfin.Api.Helpers
|
||||
var allowAsyncFileRead = false;
|
||||
|
||||
// use non-async filestream along with read due to https://github.com/dotnet/corefx/issues/6039
|
||||
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
fileOptions |= FileOptions.Asynchronous;
|
||||
allowAsyncFileRead = true;
|
||||
|
Loading…
Reference in New Issue
Block a user