From 6777f47e0e00b22562061c3b53e6aa923449fb70 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 21 May 2024 20:19:15 +0200 Subject: [PATCH] Retain order blu-ray segments --- MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index 8ea0f58ea..1eca7cc65 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -1137,13 +1137,11 @@ namespace MediaBrowser.MediaEncoding.Encoder var validPlaybackFiles = _blurayExaminer.GetDiscInfo(path).Files; // Get all files from the BDMV/STREAMING directory - var directoryFiles = _fileSystem.GetFiles(Path.Join(path, "BDMV", "STREAM")); - // Only return playable local .m2ts files - return directoryFiles - .Where(f => validPlaybackFiles.Contains(f.Name, StringComparer.OrdinalIgnoreCase)) + return validPlaybackFiles + .Select(f => _fileSystem.GetFileInfo(Path.Join(path, "BDMV", "STREAM", f))) + .Where(f => f.Exists) .Select(f => f.FullName) - .Order() .ToList(); }