Skip to content

feat(metadata): fold naming value overrides into prepared metadata#260

Open
maksii wants to merge 1 commit into
mainfrom
feat/naming-overrides-in-metadata
Open

feat(metadata): fold naming value overrides into prepared metadata#260
maksii wants to merge 1 commit into
mainfrom
feat/naming-overrides-in-metadata

Conversation

@maksii

@maksii maksii commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

When a user corrects a naming component in the GUI, the correction only ever reached the release-name string. The metadata fields themselves kept the parsed value, so every consumer that reads a component rather than ReleaseName silently carried on with the value the user had just fixed:

  • the UNIT3D payload ids — category_id, type_id, resolution_id, season_number, episode_number
  • the tracker rules
  • the dupe checks
  • the trackers that rebuild the name from components instead of ReleaseName (UTP, RHD, TVC, ASC)

So a user could fix the resolution in the name and still upload with the wrong resolution_id attached.

Fix

applyReleaseNameValueOverrides folds the value overrides into the metadata itself, called from RebuildReleaseName before the name request is built. The name is unaffected — applyReleaseNameOverrides still applies the same overrides to the request as before — but the component fields now agree with it.

Release.Group moves with Tag, because resolveGroup (trackers/rules.go, unit3d/additional) prefers Release.Group over Tag. Leaving it behind would have kept the parsed group in the banned-group and internal-group checks while the name showed the corrected one.

What is deliberately not folded

Only value overrides. The name-suppression toggles (NoSeason, NoYear, NoAKA) stay naming-only: dropping season_number from the payload because the user chose to hide the season in the name would be a different and much more surprising change. NoTag and NoEdition do clear their fields, since those suppress the value rather than just its rendering.

Scope

This changes what every tracker sees, not just the ones that rebuild names — that is the point of it, but it is worth reviewing with that in mind. The full Go suite passes (87 packages, no failures); new coverage in internal/metadata/naming_test.go.

Naming overrides only reached the release-name string, so every consumer
that reads the component field kept the parsed value the user had just
corrected: the UNIT3D payload ids, the tracker rules, the dupe checks, and
the trackers that rebuild the name from components instead of ReleaseName.
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@maksii, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a2cff06-5551-4b06-96a5-44144912c5c1

📥 Commits

Reviewing files that changed from the base of the PR and between 5a00fc7 and 6109f5c.

📒 Files selected for processing (3)
  • internal/metadata/media_details.go
  • internal/metadata/naming_test.go
  • internal/metadata/release_overrides.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/naming-overrides-in-metadata

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant