Add chapters display, gray out fixed tracks, spacebar preview
This commit is contained in:
+17
-1
@@ -110,7 +110,7 @@ public class MkvService
|
||||
MkvTrack? preferredAudio = eligibleAudio.FirstOrDefault(t => t.Properties?.AudioChannels == 2)
|
||||
?? eligibleAudio.FirstOrDefault();
|
||||
|
||||
return info.Tracks.Select(t =>
|
||||
var items = info.Tracks.Select(t =>
|
||||
{
|
||||
bool copy = t.Type switch
|
||||
{
|
||||
@@ -136,6 +136,22 @@ public class MkvService
|
||||
Copy = copy,
|
||||
};
|
||||
}).ToList();
|
||||
|
||||
int chapterCount = info.Chapters.Sum(c => c.NumEntries);
|
||||
if (chapterCount > 0)
|
||||
{
|
||||
items.Add(new TrackItem
|
||||
{
|
||||
Id = -1,
|
||||
Type = "chapters",
|
||||
Codec = string.Empty,
|
||||
Language = string.Empty,
|
||||
Name = $"Chapters ({chapterCount})",
|
||||
Copy = true,
|
||||
});
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user