Skip to content

fix(metadata): detect bdremux and bdrip#256

Open
maksii wants to merge 1 commit into
mainfrom
fix/bdremux-bdrip-detection
Open

fix(metadata): detect bdremux and bdrip#256
maksii wants to merge 1 commit into
mainfrom
fix/bdremux-bdrip-detection

Conversation

@maksii

@maksii maksii commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

BDRemux and BDRip are the naming conventions in common use across CIS release communities, where they are expected in place of the Blu-ray REMUX / BluRay spellings 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

parsedReleaseType returned "" when the parsed tokens carried nothing it recognised, discarding the name entirely. It now falls back to inferReleaseTypeFromName(base), which is the same name-based inference the source resolver already relied on — it just was never reachable from the type path.

inferReleaseTypeFromName additionally learns BDRIP -> ENCODE. BDRemux needs no new case: once the fallback is wired up, the existing REMUX token match resolves it.

Source

inferReleaseSourceFromName matched BLURAY and the split BLU/RAY spellings, but not the glued BD forms. Added BDREMUX, BDRIP and BDMV, all of which are Blu-ray sourced.

Result

Show S01 2019 BDRemux 1080p           -> type REMUX,  source BluRay
Show S01 2022 BDRip 1080p x265-GRP    -> type ENCODE, source BDRiP

Covered by two new cases in TestParseReleaseInfo.

Summary by CodeRabbit

  • Bug Fixes
    • Improved release metadata detection for Blu-ray naming patterns, including BDRip, BDRemux, and BDMV.
    • Release types are now inferred from names when other metadata signals are unavailable.
    • Correctly identifies categories, sources, types, and groups for glued Blu-ray release names.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Release parsing now recognizes glued Blu-ray markers, infers BDRIP as ENCODE, broadens Blu-ray source detection, and falls back to release-name inference when other type signals are unavailable.

Changes

Release inference

Layer / File(s) Summary
Blu-ray name signal recognition
internal/metadata/naming.go
BDRIP now maps to ENCODE, and BDREMUX, BDRIP, and BDMV are recognized as Blu-ray sources.
Type fallback and validation
internal/metadata/release.go, internal/metadata/release_test.go
Release type inference falls back to the release name, with tests covering glued BDRemux and BDRip inputs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: audionut

Poem

I’m a rabbit with releases bright,
BDRemux hops into type,
BDRip finds its source just right.
Names now guide the parsing flight,
And tests nibble bugs from sight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: improving metadata parsing to detect BDRemux and BDRip releases.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bdremux-bdrip-detection

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
internal/metadata/release_test.go (1)

64-78: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a BDMV case to this parser test. ParseReleaseInfo has a separate BDMV source-inference branch, and this table still only covers BDRemux/BDRip; add a synthetic BDMV fixture 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5a00fc7 and 9907ee5.

📒 Files selected for processing (3)
  • internal/metadata/naming.go
  • internal/metadata/release.go
  • internal/metadata/release_test.go

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