fix(metadata): detect bdremux and bdrip#256
Conversation
📝 WalkthroughWalkthroughRelease parsing now recognizes glued Blu-ray markers, infers ChangesRelease inference
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/metadata/release_test.go (1)
64-78: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a BDMV case to this parser test.
ParseReleaseInfohas a separateBDMVsource-inference branch, and this table still only coversBDRemux/BDRip; add a syntheticBDMVfixture here so that path can’t regress.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/metadata/release_test.go` around lines 64 - 78, Add a table-driven fixture in the ParseReleaseInfo test cases covering a synthetic release containing BDMV, and assert the expected category, type, source, and group fields so the dedicated BDMV source-inference branch is exercised.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@internal/metadata/release_test.go`:
- Around line 64-78: Add a table-driven fixture in the ParseReleaseInfo test
cases covering a synthetic release containing BDMV, and assert the expected
category, type, source, and group fields so the dedicated BDMV source-inference
branch is exercised.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 61c586a8-df04-4c36-abe8-dedb695902fa
📒 Files selected for processing (3)
internal/metadata/naming.gointernal/metadata/release.gointernal/metadata/release_test.go
BDRemuxandBDRipare the naming conventions in common use across CIS release communities, where they are expected in place of theBlu-ray REMUX/BluRayspellings the rest of the world tends to prefer. Neither glued form was recognised, so releases named that way parsed with no type and no source at all.Type
parsedReleaseTypereturned""when the parsed tokens carried nothing it recognised, discarding the name entirely. It now falls back toinferReleaseTypeFromName(base), which is the same name-based inference the source resolver already relied on — it just was never reachable from the type path.inferReleaseTypeFromNameadditionally learnsBDRIP->ENCODE.BDRemuxneeds no new case: once the fallback is wired up, the existingREMUXtoken match resolves it.Source
inferReleaseSourceFromNamematchedBLURAYand the splitBLU/RAYspellings, but not the gluedBDforms. AddedBDREMUX,BDRIPandBDMV, all of which are Blu-ray sourced.Result
Covered by two new cases in
TestParseReleaseInfo.Summary by CodeRabbit