From 9eab3e3d158392a159f89c1a807c831ddef85c3a Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 2 Nov 2026 08:12:33 -0800 Subject: [PATCH 1/5] Remove Unused Code Ahead of Expanding Test Coverage Coverage analysis found members with no caller anywhere in the product, plugins, tests, or the sandbox. Testing them would raise the coverage number without testing anything that runs, so they are deleted instead: the typed MediaInfo XML parser and its schema types, a streamed-stdout tool execution path, a media props self-test, and unused command-line builder options. The sidecar v4 to v5 upgrade keeps its generic XML to JSON conversion. Bump the version to 3.24 for the coverage work. Co-Authored-By: Claude Opus 5.5 --- ARCHITECTURE.md | 12 +- HISTORY.md | 5 + PlexCleaner/FfProbeBuilder.cs | 4 - PlexCleaner/MediaInfoBuilder.cs | 2 - PlexCleaner/MediaInfoToolXmlSchema.cs | 94 -------------- PlexCleaner/MediaInfoXmlParser.cs | 171 -------------------------- PlexCleaner/MediaTool.cs | 77 ------------ PlexCleaner/MkvMergeBuilder.cs | 2 - PlexCleaner/ProcessFile.cs | 34 ----- README.md | 8 +- version.json | 2 +- 11 files changed, 11 insertions(+), 400 deletions(-) delete mode 100644 PlexCleaner/MediaInfoToolXmlSchema.cs diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index e2688341..fc7b1e6f 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -175,22 +175,16 @@ Critical performance feature - DO NOT break compatibility: ### XML and JSON Parsing -AOT-safe parsers in `MediaInfoXmlParser.cs`: +AOT-safe parser in `MediaInfoXmlParser.cs`, avoiding `XmlSerializer` (not AOT-compatible): -- **MediaInfoFromXml()**: Parses specific MediaInfo XML elements into `MediaInfoToolXmlSchema.MediaInfo` - - Manually parses only known elements needed by PlexCleaner (id, format, language, etc.) - - Used by sidecar file system to parse XML output when JSON unavailable - - Avoids XmlSerializer (not AOT-compatible) - **GenericXmlToJson()**: Converts any XML file to JSON format - - Preserves all elements and attributes (unlike MediaInfoFromXml's selective parsing) + - Used by the sidecar v4 to v5 upgrade, which converts the stored MediaInfo XML to JSON + - Preserves all elements and attributes - Handles attributes: prefix with `@` for elements with children, no prefix for leaf elements - Detects arrays: elements appearing multiple times become JSON arrays - Two-pass algorithm: collect children to detect arrays, then write JSON - Uses `XmlReader` and `Utf8JsonWriter` for streaming efficiency - Special handling for MediaInfo's mixed attribute/text content format (creatingLibrary) -- **MediaInfoXmlToJson()**: Converts parsed MediaInfo XML to MediaInfo JSON schema - - Bridges between XML and JSON schema types - - Maps only known MediaInfo track properties Parser design patterns: diff --git a/HISTORY.md b/HISTORY.md index 6902fd66..02269cca 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,6 +4,11 @@ Utility to optimize media files for Direct Play in Plex, Emby, Jellyfin, etc. ## Release History +- Version 3.24: + - Removed code that nothing called, as the first step toward broader test coverage, with no change in processing behavior. + - The MediaInfo XML parser that built typed XML schema objects, and those schema types. The sidecar v4 to v5 upgrade keeps its generic XML to JSON conversion. + - An unused tool execution path that streamed standard output, and unused tool command-line builder options. + - An unused media props self-test method. - Version 3.23: - Added a minimum version for every media tool, and PlexCleaner exits with an error at startup when an installed tool is older. - The minimums are FFmpeg 8.0, HandBrake 1.10.0, MediaInfo 25.07, MKVToolNix 94.0, and 7-Zip 25.01. diff --git a/PlexCleaner/FfProbeBuilder.cs b/PlexCleaner/FfProbeBuilder.cs index 679702e4..a1f499bd 100644 --- a/PlexCleaner/FfProbeBuilder.cs +++ b/PlexCleaner/FfProbeBuilder.cs @@ -18,8 +18,6 @@ public class GlobalOptions(ArgumentsBuilder argumentsBuilder) public GlobalOptions LogLevelError() => LogLevel("error"); - public GlobalOptions LogLevelQuiet() => LogLevel("quiet"); - public GlobalOptions HideBanner() => Add("-hide_banner"); public GlobalOptions AnalyzeDuration() => Add("-analyzeduration"); @@ -56,8 +54,6 @@ public class FfProbeOptions(ArgumentsBuilder argumentsBuilder) public FfProbeOptions ShowPackets() => Add("-show_packets"); - public FfProbeOptions ShowFrames() => Add("-show_frames"); - public FfProbeOptions ShowFormat() => Add("-show_format"); public FfProbeOptions AnalyzeFrames() => Add("-analyze_frames"); diff --git a/PlexCleaner/MediaInfoBuilder.cs b/PlexCleaner/MediaInfoBuilder.cs index d03ce3cc..4447a9fc 100644 --- a/PlexCleaner/MediaInfoBuilder.cs +++ b/PlexCleaner/MediaInfoBuilder.cs @@ -28,8 +28,6 @@ public class MediaInfoOptions(ArgumentsBuilder argumentsBuilder) { public MediaInfoOptions OutputFormat(string option) => Add($"--Output={option}"); - public MediaInfoOptions OutputFormatXml() => OutputFormat("XML"); - public MediaInfoOptions OutputFormatJson() => OutputFormat("JSON"); public MediaInfoOptions InputFile(string option) => Add($"\"{option}\""); diff --git a/PlexCleaner/MediaInfoToolXmlSchema.cs b/PlexCleaner/MediaInfoToolXmlSchema.cs deleted file mode 100644 index ff3526c0..00000000 --- a/PlexCleaner/MediaInfoToolXmlSchema.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System.Xml.Serialization; - -// https://github.com/MediaArea/MediaAreaXml/blob/master/mediainfo.xsd -// https://mediaarea.net/en/MediaInfo/Support/Tags - -// Use mediainfo example output: -// mediainfo --Output=XML file.mkv - -namespace PlexCleaner; - -public class MediaInfoToolXmlSchema -{ - [XmlRoot("MediaInfo", Namespace = "https://mediaarea.net/mediainfo", IsNullable = false)] - public class MediaInfo - { - [XmlElement("media", IsNullable = false)] - public Media Media { get; set; } = new(); - - public static MediaInfo FromXml(string xml) => MediaInfoXmlParser.MediaInfoFromXml(xml); - - public static bool StringToBool(string value) => - !string.IsNullOrEmpty(value) - && ( - value.Equals("yes", StringComparison.OrdinalIgnoreCase) - || value.Equals("true", StringComparison.OrdinalIgnoreCase) - || value.Equals("1", StringComparison.OrdinalIgnoreCase) - ); - } - - [XmlRoot("media")] - public class Media - { - [XmlElement("track")] - public List Tracks { get; set; } = []; - } - - [XmlRoot("track")] - public class Track - { - [XmlAttribute("type")] - public string Type { get; set; } = string.Empty; - - [XmlElement("ID")] - public string Id { get; set; } = string.Empty; - - [XmlElement("UniqueID")] - public string UniqueId { get; set; } = string.Empty; - - [XmlElement("Duration")] - public string Duration { get; set; } = string.Empty; - - [XmlElement("Format")] - public string Format { get; set; } = string.Empty; - - [XmlElement("Format_Profile")] - public string FormatProfile { get; set; } = string.Empty; - - [XmlElement("Format_Level")] - public string FormatLevel { get; set; } = string.Empty; - - [XmlElement("HDR_Format")] - public string HdrFormat { get; set; } = string.Empty; - - [XmlElement("CodecID")] - public string CodecId { get; set; } = string.Empty; - - [XmlElement("Language")] - public string Language { get; set; } = string.Empty; - - [XmlElement("Default")] - public string Default { get; set; } = string.Empty; - - [XmlIgnore] - public bool IsDefault => MediaInfo.StringToBool(Default); - - [XmlElement("Forced")] - public string Forced { get; set; } = string.Empty; - - [XmlIgnore] - public bool IsForced => MediaInfo.StringToBool(Forced); - - [XmlElement("MuxingMode")] - public string MuxingMode { get; set; } = string.Empty; - - [XmlElement("StreamOrder")] - public string StreamOrder { get; set; } = string.Empty; - - [XmlElement("ScanType")] - public string ScanType { get; set; } = string.Empty; - - [XmlElement("Title")] - public string Title { get; set; } = string.Empty; - } -} diff --git a/PlexCleaner/MediaInfoXmlParser.cs b/PlexCleaner/MediaInfoXmlParser.cs index 5a837889..2e751c95 100644 --- a/PlexCleaner/MediaInfoXmlParser.cs +++ b/PlexCleaner/MediaInfoXmlParser.cs @@ -10,139 +10,6 @@ namespace PlexCleaner; public static class MediaInfoXmlParser { - // Parses known MediaInfo XML elements and converts to MediaInfo object - public static MediaInfoToolXmlSchema.MediaInfo MediaInfoFromXml(string xml) - { - MediaInfoToolXmlSchema.MediaInfo mediaInfo = new(); - using StringReader stringReader = new(xml); - XmlReaderSettings settings = new() - { - DtdProcessing = DtdProcessing.Prohibit, - XmlResolver = null, - IgnoreWhitespace = true, - IgnoreComments = true, - }; - - using XmlReader reader = XmlReader.Create(stringReader, settings); - while (reader.Read()) - { - if ( - reader.NodeType == XmlNodeType.Element - && reader.LocalName.Equals("mediainfo", StringComparison.OrdinalIgnoreCase) - ) - { - ParseMediaInfo(reader, mediaInfo); - break; - } - } - - return mediaInfo; - } - - private static void ParseMediaInfo(XmlReader reader, MediaInfoToolXmlSchema.MediaInfo mediaInfo) - { - int mediaInfoDepth = reader.Depth; - while (reader.Read() && reader.Depth > mediaInfoDepth) - { - if ( - reader.NodeType == XmlNodeType.Element - && reader.LocalName.Equals("media", StringComparison.OrdinalIgnoreCase) - ) - { - ParseMedia(reader, mediaInfo.Media); - } - } - } - - private static void ParseMedia(XmlReader reader, MediaInfoToolXmlSchema.Media media) - { - int mediaDepth = reader.Depth; - while (reader.Read() && reader.Depth > mediaDepth) - { - if ( - reader.NodeType == XmlNodeType.Element - && reader.LocalName.Equals("track", StringComparison.OrdinalIgnoreCase) - ) - { - MediaInfoToolXmlSchema.Track track = ParseTrack(reader); - media.Tracks.Add(track); - } - } - } - - private static MediaInfoToolXmlSchema.Track ParseTrack(XmlReader reader) - { - MediaInfoToolXmlSchema.Track track = new(); - if (reader.HasAttributes) - { - track.Type = reader.GetAttribute("type") ?? string.Empty; - } - - int trackDepth = reader.Depth; - while (reader.Read() && reader.Depth > trackDepth) - { - if (reader.NodeType == XmlNodeType.Element) - { - string elementName = reader.LocalName; - if (reader.Read() && reader.NodeType == XmlNodeType.Text) - { - switch (elementName.ToLowerInvariant()) - { - case "id": - track.Id = reader.Value; - break; - case "uniqueid": - track.UniqueId = reader.Value; - break; - case "duration": - track.Duration = reader.Value; - break; - case "format": - track.Format = reader.Value; - break; - case "format_profile": - track.FormatProfile = reader.Value; - break; - case "format_level": - track.FormatLevel = reader.Value; - break; - case "hdr_format": - track.HdrFormat = reader.Value; - break; - case "codecid": - track.CodecId = reader.Value; - break; - case "language": - track.Language = reader.Value; - break; - case "default": - track.Default = reader.Value; - break; - case "forced": - track.Forced = reader.Value; - break; - case "muxingmode": - track.MuxingMode = reader.Value; - break; - case "streamorder": - track.StreamOrder = reader.Value; - break; - case "scantype": - track.ScanType = reader.Value; - break; - case "title": - track.Title = reader.Value; - break; - default: - break; - } - } - } - } - - return track; - } - // Parses all MediaInfo XML elements and converts to JSON public static string GenericXmlToJson(string xml) { @@ -394,42 +261,4 @@ private class ElementData public Dictionary> Children { get; } = []; public string TextContent { get; set; } = string.Empty; } - - // Parses known MediaInfo XML elements and converts to JSON - public static string MediaInfoXmlToJson(string mediaInfoXml) - { - // Serialize from XML - MediaInfoToolXmlSchema.MediaInfo xmlMediaInfo = MediaInfoToolXmlSchema.MediaInfo.FromXml( - mediaInfoXml - ); - - // Copy to JSON schema - MediaInfoToolJsonSchema.MediaInfo jsonMediaInfo = new(); - foreach (MediaInfoToolXmlSchema.Track xmlTrack in xmlMediaInfo.Media.Tracks) - { - MediaInfoToolJsonSchema.Track jsonTrack = new() - { - Type = xmlTrack.Type, - Id = xmlTrack.Id, - UniqueId = xmlTrack.UniqueId, - Duration = xmlTrack.Duration, - Format = xmlTrack.Format, - FormatProfile = xmlTrack.FormatProfile, - FormatLevel = xmlTrack.FormatLevel, - HdrFormat = xmlTrack.HdrFormat, - CodecId = xmlTrack.CodecId, - Language = xmlTrack.Language, - Default = xmlTrack.Default, - Forced = xmlTrack.Forced, - MuxingMode = xmlTrack.MuxingMode, - StreamOrder = xmlTrack.StreamOrder, - ScanType = xmlTrack.ScanType, - Title = xmlTrack.Title, - }; - jsonMediaInfo.Media.Tracks.Add(jsonTrack); - } - - // Serialize to JSON - return JsonSerializer.Serialize(jsonMediaInfo, MediaInfoToolJsonContext.Default.MediaInfo); - } } diff --git a/PlexCleaner/MediaTool.cs b/PlexCleaner/MediaTool.cs index d07840ac..fc7a450a 100644 --- a/PlexCleaner/MediaTool.cs +++ b/PlexCleaner/MediaTool.cs @@ -445,83 +445,6 @@ public bool ExecuteStreamStdErr( } } - public bool ExecuteStreamStdOut( - Command command, - Action lineAction, - out int exitCode, - out string standardError, - [CallerMemberName] string operation = "" - ) - { - exitCode = -1; - standardError = string.Empty; - int processId = -1; - long startTimestamp = Stopwatch.GetTimestamp(); - try - { - // Stream stdout line by line to the caller (progress output), summarize stderr for logging - PipeTarget stdOutTarget = PipeTarget.Create( - async (stream, cancellationToken) => - { - using StreamReader reader = new(stream, Encoding.Default, false, 1024, true); - while (await reader.ReadLineAsync(cancellationToken) is { } line) - { - if (cancellationToken.IsCancellationRequested) - { - return; - } - lineAction(line); - } - } - ); - StringBuilder stdErrBuilder = new(); - PipeTarget stdErrTarget = ToStringSummary(stdErrBuilder); - - CommandTask task = command - .WithStandardOutputPipe(stdOutTarget) - .WithStandardErrorPipe(stdErrTarget) - .WithValidation(CommandResultValidation.None) - .ExecuteAsync(CancellationToken.None, Program.CancelToken()); - processId = task.ProcessId; - Log.Debug( - "Executing {ToolType} : {Operation:l} : ProcessId: {ProcessId}, Arguments: {Arguments}", - GetToolType(), - operation, - processId, - command.Arguments - ); - - CommandResult commandResult = task.Task.GetAwaiter().GetResult(); - exitCode = commandResult.ExitCode; - standardError = stdErrBuilder.ToString(); - return task.Task.IsCompletedSuccessfully; - } - catch (OperationCanceledException) - { - Log.Error( - "Cancelled execution of {ToolType} : {Operation:l} : ProcessId: {ProcessId}, Arguments: {Arguments}", - GetToolType(), - operation, - processId, - command.Arguments - ); - ToolErrorScope.Record(); - return false; - } - catch (Exception e) when (Log.Logger.LogAndHandle(e)) - { - ToolErrorScope.Record(); - return false; - } - finally - { - Metrics.RecordToolDuration( - GetToolType(), - Stopwatch.GetElapsedTime(startTimestamp).TotalMilliseconds - ); - } - } - public static PipeTarget ToStringBuilder(StringBuilder stringBuilder) => PipeTarget.Create( async (stream, cancellationToken) => diff --git a/PlexCleaner/MkvMergeBuilder.cs b/PlexCleaner/MkvMergeBuilder.cs index 16136593..7139bd30 100644 --- a/PlexCleaner/MkvMergeBuilder.cs +++ b/PlexCleaner/MkvMergeBuilder.cs @@ -11,8 +11,6 @@ public class GlobalOptions(ArgumentsBuilder argumentsBuilder) public GlobalOptions Default() => DisableTrackStatisticsTags().NormalizeLanguageIetfExtended(); - public GlobalOptions Quiet() => Add("--quiet"); - public GlobalOptions NormalizeLanguageIetf(string option) => Add("--normalize-language-ietf").Add(option); diff --git a/PlexCleaner/ProcessFile.cs b/PlexCleaner/ProcessFile.cs index fa6da9fe..130f1c8e 100644 --- a/PlexCleaner/ProcessFile.cs +++ b/PlexCleaner/ProcessFile.cs @@ -2853,40 +2853,6 @@ public bool GetMediaProps() return true; } - public bool TestMediaProps() - { - // Only called from test code to verify behavior of parsing logic - - // Get media info - if (!Refresh(false)) - { - Log.Error("Failed to get media tool info : {FileName}", FileInfo.FullName); - return false; - } - - // Verify that all codecs and tracks are supported - if (MediaInfoProps.Unsupported || FfProbeProps.Unsupported || MkvMergeProps.Unsupported) - { - Log.Error("Unsupported media info : {FileName}", FileInfo.FullName); - if (MediaInfoProps.Unsupported) - { - MediaInfoProps.WriteLine("Unsupported"); - } - if (MkvMergeProps.Unsupported) - { - MkvMergeProps.WriteLine("Unsupported"); - } - if (FfProbeProps.Unsupported) - { - FfProbeProps.WriteLine("Unsupported"); - } - return false; - } - - // Done - return true; - } - public bool GetBitrateInfo(out BitrateInfo? bitrateInfo) => GetPacketAnalysis(Program.Options.QuickScan, out bitrateInfo, out _); diff --git a/README.md b/README.md index 4a1f2d1d..0f8db84c 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,11 @@ Utility to optimize media files for Direct Play in Plex, Emby, Jellyfin, etc. ### Release Notes -**Version: 3.23**: +**Version: 3.24**: **Summary:** -- Added a minimum version for every media tool, checked at startup, such as FFmpeg 8.0 and HandBrake 1.10.0. -- Renamed the Docker image test script to `/Test/test.sh` and the version script to `/PlexCleaner/version.sh`. -- Fixed a verify false positive that reported healthy video with an irregular frame cadence as non-monotonic DTS. -- Stopped re-encoding to repair a non-monotonic DTS that only appears after decode, since the re-encode drops frames. -- An exception in one file fails only that file instead of ending the run. +- Removed code that nothing called, as the first step toward broader test coverage, with no change in processing behavior. See [Release History](./HISTORY.md) for complete release notes and older versions. diff --git a/version.json b/version.json index 88fde9cd..f95f61c2 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "3.23", + "version": "3.24", "publicReleaseRefSpec": [ "^refs/heads/main$" ], From 16a4d389471aad4d040d7a883080ed5c738a7ec4 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 2 Nov 2026 08:14:41 -0800 Subject: [PATCH 2/5] Drop the Xml2CSharp Credit Now That No Generated XML Schema Remains Co-Authored-By: Claude Opus 5.5 --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 0f8db84c..5964c7b2 100644 --- a/README.md +++ b/README.md @@ -1065,7 +1065,6 @@ The third-party tools, libraries, and actions this project depends on. | [RFC 5646 language tags][rfc5646-link] | Language tag standard. | | [Serilog][serilog-link] | Structured logging library for .NET. | | [Utf8JsonAsyncStreamReader][utf8jsonasync-link] | Streaming JSON reader for .NET. | -| [Xml2CSharp][xmltocsharp-link] | XML to C# class generator. | | [xUnit.Net][xunit-link] | Test framework for .NET. | ## Sample Media Files @@ -1161,5 +1160,4 @@ Licensed under the [MIT License][license]\ [visualstudio-link]: https://visualstudio.microsoft.com/downloads/ [vscode-link]: https://code.visualstudio.com/download [winget-cli-issue-link]: https://github.com/microsoft/winget-cli/issues/3437 -[xmltocsharp-link]: https://xmltocsharp.azurewebsites.net/ [xunit-link]: https://xunit.net/ From 7ad7b5e0bd16ab3f39991cc254bcbd18d79fb93e Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 2 Nov 2026 08:49:45 -0800 Subject: [PATCH 3/5] State Which XML Attributes the Generic Converter Keeps Co-Authored-By: Claude Opus 5.5 --- ARCHITECTURE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index fc7b1e6f..56199b36 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -179,7 +179,8 @@ AOT-safe parser in `MediaInfoXmlParser.cs`, avoiding `XmlSerializer` (not AOT-co - **GenericXmlToJson()**: Converts any XML file to JSON format - Used by the sidecar v4 to v5 upgrade, which converts the stored MediaInfo XML to JSON - - Preserves all elements and attributes + - Preserves every element below the root with its attributes, except namespace and `xsi` attributes + - Does not write the root element's own attributes - Handles attributes: prefix with `@` for elements with children, no prefix for leaf elements - Detects arrays: elements appearing multiple times become JSON arrays - Two-pass algorithm: collect children to detect arrays, then write JSON From 6a1636f26e7ac4e23c648be81ce1d51fa690e9a9 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 2 Nov 2026 08:51:29 -0800 Subject: [PATCH 4/5] Describe the Generic XML Converter as Buffered, Not Streaming Co-Authored-By: Claude Opus 5.5 --- ARCHITECTURE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 56199b36..9e688553 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -184,7 +184,7 @@ AOT-safe parser in `MediaInfoXmlParser.cs`, avoiding `XmlSerializer` (not AOT-co - Handles attributes: prefix with `@` for elements with children, no prefix for leaf elements - Detects arrays: elements appearing multiple times become JSON arrays - Two-pass algorithm: collect children to detect arrays, then write JSON - - Uses `XmlReader` and `Utf8JsonWriter` for streaming efficiency + - Reads with `XmlReader` into an in-memory `ElementData` tree, then writes it with `Utf8JsonWriter` - Special handling for MediaInfo's mixed attribute/text content format (creatingLibrary) Parser design patterns: From 60183439fe8f233acad3aac4197311a9224a7164 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 2 Nov 2026 08:58:06 -0800 Subject: [PATCH 5/5] Drop the Streaming Claim from the XML Reader Pattern Co-Authored-By: Claude Opus 5.5 --- ARCHITECTURE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 9e688553..28323a26 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -189,7 +189,7 @@ AOT-safe parser in `MediaInfoXmlParser.cs`, avoiding `XmlSerializer` (not AOT-co Parser design patterns: -- Forward-only `XmlReader` with depth tracking for streaming +- Forward-only `XmlReader` with depth tracking - Recursive `ElementData` tree for generic XML-to-JSON conversion - Namespace filtering (skip `xmlns`, `xsi` attributes) - Special handling for MediaInfo's mixed attribute/text content format