Skip to content

Commit

Permalink
Retain order blu-ray segments
Browse files Browse the repository at this point in the history
  • Loading branch information
Bond-009 committed May 21, 2024
1 parent d608f1e commit 6777f47
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1137,13 +1137,11 @@ public IReadOnlyList<string> GetPrimaryPlaylistM2tsFiles(string path)
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();
}

Expand Down

0 comments on commit 6777f47

Please sign in to comment.