pub static RESOLUTION_REGEX: Lazy<Regex>Expand description
Resolution detector. Ported from QualityParser.cs:49-50.
Named groups: R360p, R480p, R540p, R576p, R720p, R1080p,
R2160p. Case-insensitive (IgnoreCase in C# → (?i) flag here).
Cross-checked against C#: every alternative branch, including the
4kto1080p downscaled-UHD token on the R1080p branch, is reproduced
verbatim. The one place this port deliberately differs from the m50
plan-spec draft is the R2160p branch’s 4K alternatives: the plan
drafted 4kto2160p, but C# actually carries
4k[-_. ](?:UHD|HEVC|BD|H265)|(?:UHD|HEVC|BD|H265)[-_. ]4k. C# is
authoritative per the m50 standing rules, so the port mirrors C#.
The Rust regex crate accepts the pattern as-is, with every named
group unique and no lookarounds.