aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2023-01-20 07:29:45 -0500
committerGitHub <noreply@github.com>2023-01-20 13:29:45 +0100
commitdb1913b08fac0749133634efebd1ee7a7876147a (patch)
treea33ab9c840b4ed48f95cf5c833204bcc64a93314 /MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
parente448797df06c1b3d645349ac65ab142e3785caae (diff)
Remove DvdLib (#9068)
* Remove DvdLib * Update error message for blu-ray folders Co-authored-by: Shadowghost <Shadowghost@users.noreply.github.com> * Remove BDInfo * Remove MediaEncoder.GetPrimaryPlaylistVobFiles * Remove BlurayDiscInfo Co-authored-by: Shadowghost <Shadowghost@users.noreply.github.com>
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs79
1 files changed, 0 insertions, 79 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index d95f894c5..d2240b5af 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -862,85 +862,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
throw new NotImplementedException();
}
- /// <inheritdoc />
- public IEnumerable<string> GetPrimaryPlaylistVobFiles(string path, uint? titleNumber)
- {
- // min size 300 mb
- const long MinPlayableSize = 314572800;
-
- // Try to eliminate menus and intros by skipping all files at the front of the list that are less than the minimum size
- // Once we reach a file that is at least the minimum, return all subsequent ones
- var allVobs = _fileSystem.GetFiles(path, true)
- .Where(file => string.Equals(file.Extension, ".vob", StringComparison.OrdinalIgnoreCase))
- .OrderBy(i => i.FullName)
- .ToList();
-
- // If we didn't find any satisfying the min length, just take them all
- if (allVobs.Count == 0)
- {
- _logger.LogWarning("No vobs found in dvd structure.");
- return Enumerable.Empty<string>();
- }
-
- if (titleNumber.HasValue)
- {
- var prefix = string.Format(
- CultureInfo.InvariantCulture,
- titleNumber.Value >= 10 ? "VTS_{0}_" : "VTS_0{0}_",
- titleNumber.Value);
- var vobs = allVobs.Where(i => i.Name.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)).ToList();
-
- if (vobs.Count > 0)
- {
- var minSizeVobs = vobs
- .SkipWhile(f => f.Length < MinPlayableSize)
- .ToList();
-
- return minSizeVobs.Count == 0 ? vobs.Select(i => i.FullName) : minSizeVobs.Select(i => i.FullName);
- }
-
- _logger.LogWarning("Could not determine vob file list for {Path} using DvdLib. Will scan using file sizes.", path);
- }
-
- var files = allVobs
- .SkipWhile(f => f.Length < MinPlayableSize)
- .ToList();
-
- // If we didn't find any satisfying the min length, just take them all
- if (files.Count == 0)
- {
- _logger.LogWarning("Vob size filter resulted in zero matches. Taking all vobs.");
- files = allVobs;
- }
-
- // Assuming they're named "vts_05_01", take all files whose second part matches that of the first file
- if (files.Count > 0)
- {
- var parts = _fileSystem.GetFileNameWithoutExtension(files[0]).Split('_');
-
- if (parts.Length == 3)
- {
- var title = parts[1];
-
- files = files.TakeWhile(f =>
- {
- var fileParts = _fileSystem.GetFileNameWithoutExtension(f).Split('_');
-
- return fileParts.Length == 3 && string.Equals(title, fileParts[1], StringComparison.OrdinalIgnoreCase);
- }).ToList();
-
- // If this resulted in not getting any vobs, just take them all
- if (files.Count == 0)
- {
- _logger.LogWarning("Vob filename filter resulted in zero matches. Taking all vobs.");
- files = allVobs;
- }
- }
- }
-
- return files.Select(i => i.FullName);
- }
-
public bool CanExtractSubtitles(string codec)
{
// TODO is there ever a case when a subtitle can't be extracted??