pub struct Revision {
pub version: u32,
pub real: u32,
pub is_repack: bool,
}Expand description
Repack / proper revision metadata.
version defaults to 1 (the original release); 2+ indicates a
PROPER, REPACK, or explicit vN marker. real is a count of REAL tags
(Sonarr stores it as int, not bool, because the modifier cascade
records every uppercase REAL match via RealRegex.Matches(name).Count).
is_repack flags REPACK; the version bump from REPACK is kept on
version separately, and the two coexist for the comparison ordering in
CompareTo.
Default is implemented manually because we need a non-zero version.
Verified at T6 (Sonarr v4.0.17.2952, Qualities/Revision.cs:19-21 and
Parser/QualityParser.cs:702-708): Real is int, set from
realRegexResult.Count. The plan-spec drafted bool, but the multi-real
case (Show.REAL.REAL.1080p) would lose information at the cast boundary.
Ported as u32 to mirror the C# signed-int counter; values are always
non-negative because Matches.Count is non-negative.
Fields§
§version: u32§real: u32§is_repack: bool