Skip to content

Fix ReplayGain crash when configured threads is zero - #7157

Open
obethgeoff10c-ops wants to merge 1 commit into
beetbox:masterfrom
obethgeoff10c-ops:fix-replaygain-zero-threads
Open

obethgeoff10c-ops wants to merge 1 commit into
beetbox:masterfrom
obethgeoff10c-ops:fix-replaygain-zero-threads

Conversation

@obethgeoff10c-ops

Copy link
Copy Markdown

Summary

Fixes #7113.

Previously, when replaygain.threads was configured as 0, running beet replaygain attempted to create a thread pool with zero processes, causing a ValueError.

This change:

  • Uses the CLI thread count when explicitly provided.
  • Falls back to the configured thread count when the CLI option is omitted.
  • Skips thread-pool creation when the thread count is zero.

Testing

  • python -m py_compile beetsplug/replaygain.py
  • pytest test/plugins/test_replaygain.py::TestReplayGainZeroThreads -v
  • pytest test/plugins/test_replaygain.py -q

Result: 5 passed, 44 skipped. Optional backend tests were skipped because audio tools were unavailable locally.

@obethgeoff10c-ops
obethgeoff10c-ops requested a review from a team as a code owner November 3, 2026 11:59
@github-actions github-actions Bot added the replaygain replaygain plugin label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

This branch has not been deployed

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

Labels

replaygain replaygain plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

replaygain: threads: 0 in config crashes beet replaygain with ValueError (only --threads 0 works)

1 participant