Skip to content

Fix version parsing for titles with nested parentheses#4119

Merged
MarvinSchenkel merged 1 commit into
devfrom
claude/sweet-maxwell-4849x
Jun 7, 2026
Merged

Fix version parsing for titles with nested parentheses#4119
MarvinSchenkel merged 1 commit into
devfrom
claude/sweet-maxwell-4849x

Conversation

@OzGav
Copy link
Copy Markdown
Contributor

@OzGav OzGav commented Jun 7, 2026

What does this implement/fix?

The non-greedy regex used to extract parenthesised version info stopped at the first closing parenthesis, mangling titles where the version itself contains nested parentheses (e.g. "Fiji (Oliver Smith Remix (Mixed))" was parsed into title "Fiji )" and version "Oliver Smith Remix (Mixed").

Use a balanced-bracket scanner and strip only the outer bracket pair so nested brackets in the version are preserved.

Related issue (if applicable):

  • related issue

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • New music/player/metadata/plugin provider — new-provider
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — documentation
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Checklist

  • The code change is tested and works locally.
  • pre-commit run --all-files passes.
  • pytest passes, and tests have been added/updated under tests/ where applicable.
  • For changes to shared models, the companion PR in music-assistant/models is linked.
  • For changes affecting the UI, the companion PR in music-assistant/frontend is linked.
  • I have read and complied with the project's AI Policy for any AI-assisted contributions.
  • I have raised a PR against the documentation repository targeting the main or beta branch as appropriate.

The non-greedy regex used to extract parenthesised version info stopped at
the first closing parenthesis, mangling titles where the version itself
contains nested parentheses (e.g. "Fiji (Oliver Smith Remix (Mixed))" was
parsed into title "Fiji )" and version "Oliver Smith Remix (Mixed").

Use a balanced-bracket scanner and strip only the outer bracket pair so
nested brackets in the version are preserved.
@github-actions github-actions Bot added the bugfix label Jun 7, 2026
Copy link
Copy Markdown
Contributor

@MarvinSchenkel MarvinSchenkel left a comment

Choose a reason for hiding this comment

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

Thanks @OzGav

@MarvinSchenkel MarvinSchenkel merged commit d509fb1 into dev Jun 7, 2026
9 checks passed
@MarvinSchenkel MarvinSchenkel deleted the claude/sweet-maxwell-4849x branch June 7, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants