Add chapters display, gray out fixed tracks, spacebar preview

This commit is contained in:
l4kr
2026-07-04 00:58:28 +02:00
parent 1208cadc3b
commit 9b1bd51bd3
5 changed files with 75 additions and 2 deletions
+17 -1
View File
@@ -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>