Skip to content

Conversation

@Nuclei8234
Copy link
Contributor

@Nuclei8234 Nuclei8234 commented Jan 3, 2026

Issue: Audio channel patterns were not matching ddpa5.1 formats
Root Cause: The regex pattern for audio channels didn't account for the optional 'a' in ddpa (Dolby Digital Plus Atmos) formats
Solution: Updated 5.1, 6.1, and 7.1 audio channel patterns to include ((p(lus)?|+)a?)? instead of (p(lus)?|+)? to support the optional 'a' suffix

Summary by CodeRabbit

Bug Fixes

  • Enhanced detection of 5.1, 6.1, and 7.1 Dolby Digital and Digital+ audio channel configurations for improved accuracy in media parsing and recognition.

✏️ Tip: You can customize this high-level summary in your review settings.

…tterns


- Update 5.1, 6.1, and 7.1 audio channel regex patterns to include optional 'a' after plus sign
- This fixes matching for ddpa5.1, ddpa6.1, ddpa7.1 formats
- Ensures proper Atmos format support in channel detection
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 3, 2026

Walkthrough

Updated audio channel regex patterns in the parser to allow an optional 'a' character following the plus indicator in Dolby Digital+ (5.1, 6.1, and 7.1) sequences. The modification expands the pattern from (p(lus)?|\+)? to (p(lus)?|\+)a? within the audioChannels object, broadening pattern matching without altering the public API surface.

Changes

Cohort / File(s) Summary
Audio Channel Regex Pattern Updates
packages/core/src/parser/regex.ts
Modified audioChannels patterns for 5.1, 6.1, and 7.1 Dolby Digital+ sequences to accept an optional 'a' character immediately following the plus/plus-like indicator (e.g., "ddpa"), broadening supported audio format variations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • Viren070

Poem

🐰✨ A pattern perfected, so subtle and neat,
Where 'a' finds its home in the Dolby beat,
Five point one, six point one, seven as well,
Regex rejoices—what stories they'll tell! 🎵

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding support for an optional 'a' after ddp in audio channel regex patterns, which directly addresses the issue of matching ddpa5.1 formats.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de956de and b53787e.

📒 Files selected for processing (1)
  • packages/core/src/parser/regex.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-14T16:46:18.507Z
Learnt from: DavidGracias
Repo: Viren070/AIOStreams PR: 375
File: packages/core/src/formatters/base.ts:0-0
Timestamp: 2025-09-14T16:46:18.507Z
Learning: In packages/core/src/formatters/base.ts, the modifier definitions intentionally include regex patterns (like "join('.*?')", "$.*?", "^.*?") that require pattern matching functionality. The buildModifierRegexPattern() method should not fully escape all regex metacharacters as this would break the intended regex matching behavior within modifier definitions.

Applied to files:

  • packages/core/src/parser/regex.ts
🔇 Additional comments (1)
packages/core/src/parser/regex.ts (1)

115-123: The regex pattern changes correctly support Dolby Digital Plus Atmos variants.

All three audio channel patterns (5.1, 6.1, 7.1) have been updated with the optional 'a' suffix — changing ((p(lus)?|\+))? to ((p(lus)?|\+)a?)? — which now matches ddpa, dd+a, and ddplusa variants whilst maintaining backward compatibility with existing patterns.

The test suite confirms all expected cases pass:

  • New cases: ddpa5.1, dd+a5.1, ddplusa5.1
  • Existing cases: ddp5.1, dd+5.1, ddplus5.1, dd5.1, 5.1
  • Formatted cases with spaces and separators

The modifications are additive, do not break any existing matches, and maintain consistency across all three affected channel configurations.


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 and usage tips.

@Viren070 Viren070 merged commit 60ca210 into Viren070:main Jan 5, 2026
3 checks passed
@Viren070 Viren070 mentioned this pull request Jan 5, 2026
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.

2 participants