Merge pull request #11781 from Bond-009/orderts

Retain order blu-ray segments
This commit is contained in:
Bond-009 2024-05-24 14:16:45 +02:00 committed by GitHub
commit 2ddf2a7866
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();
}