diff --git a/src/TaglibSharp/Matroska/Tag.cs b/src/TaglibSharp/Matroska/Tag.cs index dc38af0d..4dd7ae8c 100644 --- a/src/TaglibSharp/Matroska/Tag.cs +++ b/src/TaglibSharp/Matroska/Tag.cs @@ -903,11 +903,12 @@ public override uint Year { /// /// This property is implemented using the "PART_NUMBER" Tag. /// - public override uint Track { - get { return GetUint ("PART_NUMBER"); } - set { Set ("PART_NUMBER", null, value, "00"); } + public override uint Track { + get { return TagsGet (false, IsVideo ? TargetType.CHAPTER : TargetType.TRACK)?.GetUint ("PART_NUMBER") ?? 0; } + set { TagsGet (true, IsVideo ? TargetType.CHAPTER : TargetType.TRACK)?.Set ("PART_NUMBER", null, value,"00"); } } + /// /// Gets and sets the number of items contained in the parent Tag (album, disc, episode, collection...) /// the media represented by the current instance belongs to.