#3292

fix(crossseed): a trailing bracketed release flag such as [REPACK] is parsed as the site

Opengithub-actions[bot]opened 12d ago

This was generated by AI during triage.

Agent Brief

Category: bug Summary: A trailing bracketed release flag ([REPACK], [PROPER], ...) is parsed as the release Site, so the flag is lost and the group/site identity check rejects a same-size pair.

Current behavior: rls takes any trailing bracket as Site. A name that ends in ... - Kyo Mura) [REPACK] parses as Group Kyo Mura, Site REPACK, and an empty Other. The same flag inside the name (... (2020) REPACK (...)) lands in Other. Because the bogus Site is not empty, the space-joined group/collective rule (spaceJoinedGroupSite, added in #3283) does not apply, and the exact-size identity check compares kyo mura + repack with kyo + mura. A same-size candidate is rejected with group/site mismatch. Without the [REPACK] suffix the same pair is accepted.

Example pair (same size):

  • Source: Example Film (2020) REPACK (1080p BDRip x265 10bit AC3 5.1 - Kyo)[Mura]
  • Candidate: Example Film (2020) (1080p BluRay x265 SDR DD 5.1 English - Kyo Mura) [REPACK]

Desired behavior: When the parsed Site is a release flag (REPACK, REPACK2, PROPER, RERIP, REAL), Site is cleared and the flag is added to Other with the same value rls gives the in-name flag (for example REREPACK for REPACK2, RERiP for RERIP). The flag is not added twice when the name already carries it. A real collective or site tag such as [Mura] stays in Site. The example pair is accepted at the same size and still rejected at a different size.

Key interfaces:

  • releases.Parser.Parse(): post-processes the rls result like enrichReleaseHDR and enrichEpisodeRange, so every match path and the parse cache get the corrected release.

Acceptance criteria:

  • Parse of a name ending in [REPACK] or [PROPER] returns an empty Site and the flag in Other, matching the value rls gives the in-name flag.
  • Parse of a name ending in a collective tag such as [Mura] still returns that tag in Site.
  • The example pair passes validateExactSizeSearchIdentity at equal size, in both directions, and fails at a different size.
  • A row for the pair is added to the match corpus.

Out of scope:

  • A fix inside the rls library.
  • Changes to spaceJoinedGroupSite or other group/site rules.

Domain:

  • Glossary terms: Match path, Title rescue. Gap: no term for a release flag (REPACK/PROPER) or for Site.
  • ADRs: 0008 (matching rules read releases and file lists only).
  • Owner: releases.Parser in pkg/releases.

Logs:

  • None

From discussion #3291

Activity

0

No activity yet.