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
+9
View File
@@ -13,6 +13,15 @@ public class MkvIdentifyResult
[JsonPropertyName("tracks")]
public List<MkvTrack> Tracks { get; set; } = new();
[JsonPropertyName("chapters")]
public List<MkvChapters> Chapters { get; set; } = new();
}
public class MkvChapters
{
[JsonPropertyName("num_entries")]
public int NumEntries { get; set; }
}
public class MkvTrack
+14
View File
@@ -44,6 +44,20 @@ public class TrackItem : INotifyPropertyChanged
/// </summary>
public string DisplayName => Type == "subtitles" ? $"{Codec}/{Name}" : Name;
/// <summary>
/// Video is always kept, and chapters (a synthetic pseudo-track, not a
/// real mkvmerge track) are always kept too — neither is user-selectable,
/// so their Copy checkbox is shown checked but disabled.
/// </summary>
public bool IsEditable => Type is "audio" or "subtitles";
/// <summary>
/// Chapters aren't a real track and have no track ID; show a dash
/// instead of a meaningless number.
/// </summary>
public string IdDisplay => Type == "chapters" ? "—" : Id.ToString();
public bool Copy
{
get => _copy;