Add chapters display, gray out fixed tracks, spacebar preview
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user