Merge pull request #8867 from stanionascu/fix-8276

Fix to make sure that UDF streams are opened with Share.Read (#8276)
pull/8884/head
Claus Vium 2 years ago committed by GitHub
commit 558e3d1333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -163,9 +163,8 @@ namespace Emby.Server.Implementations.Library.Resolvers
try
{
// use disc-utils, both DVDs and BDs use UDF filesystem
using (var videoFileStream = File.Open(video.Path, FileMode.Open, FileAccess.Read))
using (UdfReader udfReader = new UdfReader(videoFileStream))
{
using var videoFileStream = File.Open(video.Path, FileMode.Open, FileAccess.Read, FileShare.Read);
using UdfReader udfReader = new UdfReader(videoFileStream);
if (udfReader.DirectoryExists("VIDEO_TS"))
{
video.IsoType = IsoType.Dvd;
@ -175,7 +174,6 @@ namespace Emby.Server.Implementations.Library.Resolvers
video.IsoType = IsoType.BluRay;
}
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Error opening UDF/ISO image: {Value}", video.Path ?? video.Name);

Loading…
Cancel
Save