mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
Replace BDInfo plugin with nupkg and UHD/Atmos/DTS:X support
This commit is contained in:
40
MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
Normal file
40
MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using MediaBrowser.Model.IO;
|
||||
|
||||
namespace MediaBrowser.MediaEncoding.BdInfo
|
||||
{
|
||||
class BdInfoFileInfo : BDInfo.IO.IFileInfo
|
||||
{
|
||||
IFileSystem _fileSystem = null;
|
||||
|
||||
FileSystemMetadata _impl = null;
|
||||
|
||||
public string Name => _impl.Name;
|
||||
|
||||
public string FullName => _impl.FullName;
|
||||
|
||||
public string Extension => _impl.Extension;
|
||||
|
||||
public long Length => _impl.Length;
|
||||
|
||||
public bool IsDir => _impl.IsDirectory;
|
||||
|
||||
public BdInfoFileInfo(IFileSystem fileSystem, FileSystemMetadata impl)
|
||||
{
|
||||
_fileSystem = fileSystem;
|
||||
_impl = impl;
|
||||
}
|
||||
|
||||
public System.IO.Stream OpenRead()
|
||||
{
|
||||
return _fileSystem.GetFileStream(FullName,
|
||||
FileOpenMode.Open,
|
||||
FileAccessMode.Read,
|
||||
FileShareMode.Read);
|
||||
}
|
||||
|
||||
public System.IO.StreamReader OpenText()
|
||||
{
|
||||
return new System.IO.StreamReader(OpenRead());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user