mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-12 10:40:24 +01:00
Remove MediaBrowser.Text since it violates licenses and is overall hacky
This commit is contained in:
@@ -22,7 +22,6 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Text;
|
||||
|
||||
namespace BDInfo
|
||||
{
|
||||
@@ -72,8 +71,7 @@ namespace BDInfo
|
||||
|
||||
public event OnPlaylistFileScanError PlaylistFileScanError;
|
||||
|
||||
public BDROM(
|
||||
string path, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||
public BDROM(string path, IFileSystem fileSystem)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
@@ -167,7 +165,7 @@ namespace BDInfo
|
||||
foreach (var file in files)
|
||||
{
|
||||
PlaylistFiles.Add(
|
||||
file.Name.ToUpper(), new TSPlaylistFile(this, file, _fileSystem, textEncoding));
|
||||
file.Name.ToUpper(), new TSPlaylistFile(this, file, _fileSystem));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +185,7 @@ namespace BDInfo
|
||||
foreach (var file in files)
|
||||
{
|
||||
StreamClipFiles.Add(
|
||||
file.Name.ToUpper(), new TSStreamClipFile(file, _fileSystem, textEncoding));
|
||||
file.Name.ToUpper(), new TSStreamClipFile(file, _fileSystem));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,14 +22,12 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Text;
|
||||
|
||||
namespace BDInfo
|
||||
{
|
||||
public class TSPlaylistFile
|
||||
{
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ITextEncoding _textEncoding;
|
||||
private FileSystemMetadata FileInfo = null;
|
||||
public string FileType = null;
|
||||
public bool IsInitialized = false;
|
||||
@@ -64,26 +62,22 @@ namespace BDInfo
|
||||
public List<TSGraphicsStream> GraphicsStreams =
|
||||
new List<TSGraphicsStream>();
|
||||
|
||||
public TSPlaylistFile(
|
||||
BDROM bdrom,
|
||||
FileSystemMetadata fileInfo, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||
public TSPlaylistFile(BDROM bdrom,
|
||||
FileSystemMetadata fileInfo, IFileSystem fileSystem)
|
||||
{
|
||||
BDROM = bdrom;
|
||||
FileInfo = fileInfo;
|
||||
_fileSystem = fileSystem;
|
||||
_textEncoding = textEncoding;
|
||||
Name = fileInfo.Name.ToUpper();
|
||||
}
|
||||
|
||||
public TSPlaylistFile(
|
||||
BDROM bdrom,
|
||||
public TSPlaylistFile(BDROM bdrom,
|
||||
string name,
|
||||
List<TSStreamClip> clips, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||
List<TSStreamClip> clips, IFileSystem fileSystem)
|
||||
{
|
||||
BDROM = bdrom;
|
||||
Name = name;
|
||||
_fileSystem = fileSystem;
|
||||
_textEncoding = textEncoding;
|
||||
IsCustom = true;
|
||||
foreach (var clip in clips)
|
||||
{
|
||||
@@ -1245,8 +1239,7 @@ namespace BDInfo
|
||||
int count,
|
||||
ref int pos)
|
||||
{
|
||||
string val =
|
||||
_textEncoding.GetASCIIEncoding().GetString(data, pos, count);
|
||||
string val = Encoding.ASCII.GetString(data, pos, count);
|
||||
|
||||
pos += count;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -21,15 +21,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Text;
|
||||
|
||||
namespace BDInfo
|
||||
{
|
||||
public class TSStreamClipFile
|
||||
{
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ITextEncoding _textEncoding;
|
||||
public FileSystemMetadata FileInfo = null;
|
||||
public string FileType = null;
|
||||
public bool IsValid = false;
|
||||
@@ -38,12 +37,10 @@ namespace BDInfo
|
||||
public Dictionary<ushort, TSStream> Streams =
|
||||
new Dictionary<ushort, TSStream>();
|
||||
|
||||
public TSStreamClipFile(
|
||||
FileSystemMetadata fileInfo, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||
public TSStreamClipFile(FileSystemMetadata fileInfo, IFileSystem fileSystem)
|
||||
{
|
||||
FileInfo = fileInfo;
|
||||
_fileSystem = fileSystem;
|
||||
_textEncoding = textEncoding;
|
||||
Name = fileInfo.Name.ToUpper();
|
||||
}
|
||||
|
||||
@@ -69,7 +66,7 @@ namespace BDInfo
|
||||
byte[] fileType = new byte[8];
|
||||
Array.Copy(data, 0, fileType, 0, fileType.Length);
|
||||
|
||||
FileType = _textEncoding.GetASCIIEncoding().GetString(fileType, 0, fileType.Length);
|
||||
FileType = Encoding.ASCII.GetString(fileType, 0, fileType.Length);
|
||||
if (FileType != "HDMV0100" &&
|
||||
FileType != "HDMV0200")
|
||||
{
|
||||
@@ -165,8 +162,7 @@ namespace BDInfo
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 3,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode =
|
||||
_textEncoding.GetASCIIEncoding().GetString(languageBytes, 0, languageBytes.Length);
|
||||
string languageCode = Encoding.ASCII.GetString(languageBytes, 0, languageBytes.Length);
|
||||
|
||||
var channelLayout = (TSChannelLayout)
|
||||
(clipData[streamOffset + 2] >> 4);
|
||||
@@ -196,8 +192,7 @@ namespace BDInfo
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 2,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode =
|
||||
_textEncoding.GetASCIIEncoding().GetString(languageBytes, 0, languageBytes.Length);
|
||||
string languageCode = Encoding.ASCII.GetString(languageBytes, 0, languageBytes.Length);
|
||||
|
||||
stream = new TSGraphicsStream();
|
||||
stream.LanguageCode = languageCode;
|
||||
@@ -216,8 +211,7 @@ namespace BDInfo
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 3,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode =
|
||||
_textEncoding.GetASCIIEncoding().GetString(languageBytes, 0, languageBytes.Length);
|
||||
string languageCode = Encoding.ASCII.GetString(languageBytes, 0, languageBytes.Length);
|
||||
#if DEBUG
|
||||
Debug.WriteLine(string.Format(
|
||||
"\t{0} {1} {2}",
|
||||
|
||||
Reference in New Issue
Block a user