|
|
@ -5,6 +5,7 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.IO;
|
|
|
|
using System.IO;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using DiscUtils.Udf;
|
|
|
|
using Emby.Naming.Video;
|
|
|
|
using Emby.Naming.Video;
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
@ -201,6 +202,22 @@ namespace Emby.Server.Implementations.Library.Resolvers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
video.IsoType = IsoType.BluRay;
|
|
|
|
video.IsoType = IsoType.BluRay;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// use disc-utils, both DVDs and BDs use UDF filesystem
|
|
|
|
|
|
|
|
using (var videoFileStream = File.Open(video.Path, FileMode.Open, FileAccess.Read))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
UdfReader udfReader = new UdfReader(videoFileStream);
|
|
|
|
|
|
|
|
if (udfReader.DirectoryExists("VIDEO_TS"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
video.IsoType = IsoType.Dvd;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (udfReader.DirectoryExists("BDMV"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
video.IsoType = IsoType.BluRay;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|