Skip to main content

beets-nohirescd

nohirescd prevents high-resolution source audio from being matched to a CD release during a beets album import. It can also audit a library for existing matches that violate the same rule and send those albums through beets' normal reimport workflow.

If any source track exceeds the configured maximum bit depth or sample rate, the plugin removes candidates whose matched medium is CD. It filters both the initial candidate list and candidates returned by manual searches or entered IDs.

Install

python -m pip install "beets-nohirescd @ git+https://github.com/treyturner/beets-plugins.git#subdirectory=plugins/nohirescd"

Configure beets

Enable the plugin:

plugins:
  - nohirescd

The defaults treat audio above 16-bit or 44.1 kHz as high resolution:

nohirescd:
  max_bitdepth: 16
  max_samplerate: 44100
  cd_media_pattern: '(?:^|[^A-Za-z0-9])(?:HDCD|HQCD|CD(?:-R)?)(?:$|[^A-Za-z0-9])'

The default media pattern matches values such as CD, Enhanced CD, 8cm CD, SHM-CD, HDCD, HQCD, and CD-R. It deliberately does not match SACD.

Import behavior

On album import tasks, every source item is checked. A single item above either configured limit activates filtering for the whole album.

Both album-level media and each mapped track's media are checked. This catches mixed-media releases, which beets may represent with the generic album-level value Media while retaining CD on individual mapped tracks.

After removing candidates, the plugin recalculates beets' recommendation. This prevents quiet mode from retaining a recommendation based on a removed CD candidate and produces no recommendation when no valid candidates remain.

Audit existing albums

Run the command without a query to audit every album in the library:

beet nohirescd

The concise console report contains one line per violating album followed by album and track totals. An existing album is a violation when any of its tracks exceeds either configured resolution limit and any of its tracks has stored media matching cd_media_pattern. These may be different tracks on a mixed-media release. Singleton items are not included.

Standard beets album queries restrict the audit:

beet nohirescd albumartist:"Beyoncé"

The audit reads metadata already stored in the beets library and does not query MusicBrainz.

CSV report

Use -o or --output to write a detailed UTF-8 CSV while retaining the concise console report:

beet nohirescd --output nohirescd-audit.csv

The output contains one row per violating album and overwrites an existing file at the specified path. Its columns are:

  • album_id, mb_albumid, albumartist, and album
  • path and track_count
  • max_bitdepth and max_samplerate
  • media, containing the album's distinct stored track media
  • hires_tracks and cd_tracks, containing semicolon-separated track details that show why the album was flagged

No report file is created unless --output is supplied.

Reimport violations

Use --reimport to pass the violating albums directly to beets' library reimport pipeline instead of producing an audit report:

beet nohirescd --reimport
beet nohirescd --reimport year:1990..1999

The command preserves the normal import configuration and prompts, except that it always runs this album-only audit's results through album import mode. Any configured singleton mode is restored when the command finishes. Because the nohirescd candidate filter must run during reimport, import.autotag must be enabled. Depending on the beets import configuration and choices made during the session, reimporting can update library metadata and files. --reimport cannot be combined with --output.

Development

uv sync
uv run pytest
uv run mypy
uv run pyright

Metadata

Release files for beets-nohirescd 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beets-nohirescd 0.1.3
File Size Uploaded Provenance Actions
beets_nohirescd-0.1.3.tar.gz 11.4 kB With provenance Details for beets_nohirescd-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beets-nohirescd 0.1.3
File Interpreter ABI Platform Actions
beets_nohirescd-0.1.3-py3-none-any.whl Python 3 none any Details for beets_nohirescd-0.1.3-py3-none-any.whl

Total release size: 18.7 kB

Release files / beets_nohirescd-0.1.3.tar.gz

Download URL beets_nohirescd-0.1.3.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
96d6bf1b37d839956e4847c3503c085e379b94653d7d49349041e6db31973bc8
BLAKE2b-256 checksum
How to use checksums
3c5dbe97364188d712473e04207c3f0ebefe266e8dcc416d748e49208af18e57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / beets_nohirescd-0.1.3-py3-none-any.whl

Download URL beets_nohirescd-0.1.3-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2088961d5ac1483362e6a39b2a78b2b0149438d115441aa8b8d2d23e28feaa46
BLAKE2b-256 checksum
How to use checksums
4cd9c0b5a18ea0e43d45233b56adf914db8e7d363c39106621bbb39c8600bec7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for beets-nohirescd 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for beets_nohirescd-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page