Skip to main content

trackaudit

Find out what your music library is actually missing.

Your library manager says you have everything. It is measuring you against its own metadata source, and if that source has never heard of a release, it cannot show you the gap. For a lot of music — German rap, Turkish pop, Afrobeats, most things not sung in English — that blind spot is enormous.

trackaudit measures you against a commercial catalogue instead, and tells you what is genuinely missing.

$ trackaudit --library /mnt/music --lidarr http://localhost:8686 --lidarr-key $KEY

library: 3,723 file(s), 8 artist folder(s)

  ghost                 1     on disk, the app has no record of it
  orphan                7     on disk, no entry in the app
  duplicate_entry      28     two entries competing for one recording
  invisible           229     released, and the app cannot even show it to you
  lossy_duplicate      38     lossy copy beside a lossless one

report: trackaudit-report.html

That invisible: 229 is the number no other tool will give you. Those are real, released recordings by artists you already follow, and your library manager has never heard of a single one of them.


Install

pipx install trackaudit      # or: pip install --user trackaudit

Python 3.9+. No dependencies — standard library only.

Use it

The only required argument is your library root, the folder with one subdirectory per artist:

trackaudit --library /mnt/music

That compares the catalogue against your files and writes trackaudit-report.html — one self-contained page you open in a browser. Nothing is modified, ever, unless you explicitly pass --apply.

Add your library manager to see the disagreements between it and your disk:

trackaudit --library /mnt/music \
           --lidarr http://localhost:8686 --lidarr-key YOUR_KEY \
           --path-map /music:/mnt/music

--path-map matters. Lidarr in a container reports container paths. Without the mapping, every file you own reads as unmanaged — in testing that was 46% of a library flagged as a problem that did not exist.

Useful flags:

flag what it does
--artist NAME audit one artist (repeatable)
--artist-id "Samra=307151" pin a catalogue id, so a rename upstream cannot swap the artist
--json out.json machine-readable findings alongside the HTML
--catalogue none skip the network entirely; disk-and-app checks only
--apply act on the reversible findings (see below)
--undo FILE put back what --apply changed

What it finds

finding meaning fix
The app lost the file It is on disk; the app has no record of it rescan
Not in the library On disk, no entry at all — invisible to your players import
Two entries, one recording A single and an album track that are the same audio. One file cannot satisfy both, so one stays "missing" no matter how often you re-download it retire one entry
The app cannot see it Genuinely released, absent from the app's metadata source fetch it yourself
Released, not owned In the catalogue, not on disk download
Under another artist Filed under whoever was credited first usually fine
Lossy beside lossless An mp3 next to a flac of the same recording delete one
Too close to call Titles close enough that guessing would mis-file a track confirm by hand

That last row is deliberate. trackaudit would rather say "I don't know" than guess. A wrong "these are the same" moves a file, and moved files are how libraries get quietly destroyed.

Applying fixes

--apply touches exactly two things, both reversible:

  • rescan an artist whose file the app lost (this only makes it look again)
  • retire a duplicate single entry when you already own the recording via an album

Before it changes anything it writes trackaudit-undo-<timestamp>.json, and --undo restores from it. Everything else in the report is for you to decide on. Nothing is deleted, moved, or re-tagged — not by --apply, not ever.

Nobody hosts this

There is no server, no account, no database, and no service of mine that you depend on. It is a command that runs on your machine, reads your files, and writes an HTML file next to itself. If this repository disappeared tomorrow, your copy would keep working.

If you want the report on a URL, publish it to your own GitHub Pages — see examples/github-action.yml.

Use the matcher on its own

The hard part of this problem is deciding whether two titles name the same recording. That is packaged separately and has no I/O, so you can drop it into a beets plugin, a soularr fork, or your own scripts:

from trackaudit import compare, identity, SAME, DIFFERENT, UNCERTAIN

compare("Who Wants to Live Forever",
        "Who Wants to Live Forever (Live in Budapest)")   # -> 'different'
compare("Let There Be Rock (Part 1)",
        "Let There Be Rock (Part 2)")                     # -> 'different'
compare("Weiße Orchideen", "Weisse Orchideen")            # -> 'same'
compare("ZUN9A", "Zunga")                                 # -> 'uncertain'

identity("Song (Live)") != identity("Song")               # True

Every rule in it exists because something went wrong:

  • Qualifiers are read only where they can be appended. Scanning the whole title reports the song Live Is Life as a live recording.
  • The whole qualifying phrase is compared, not the keyword. Comparing keywords made (Part 1) and (Part 2) identical — both merely "part" — and let one album track satisfy two catalogue entries.
  • Track numbers are stripped narrowly. The obvious pattern turns 95 BPM into BPM and 365 Tage into Tage, and both then look missing.
  • Duration can veto a title match. A radio edit and the album cut often share a title exactly.
  • identity() includes the qualifier. Grouping by normalised title alone collapses Rockin' in the Free World, (edit), (live) and (LP version) into one entry.

Contributing

The most valuable thing you can add is a test case, not code. If trackaudit judged two of your titles wrongly, add the pair to tests/corpus.json — it is three lines, and it improves matching for everyone. See CONTRIBUTING.md.

git clone https://github.com/Naseem48/trackaudit && cd trackaudit
pip install -e ".[dev]"
pytest

Licence

MIT.

Metadata

Release files for trackaudit 0.1.0

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

Source distribution (sdist)

Source distribution for trackaudit 0.1.0
File Size Uploaded Provenance Actions
trackaudit-0.1.0.tar.gz 36.3 kB With provenance Details for trackaudit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for trackaudit 0.1.0
File Interpreter ABI Platform Actions
trackaudit-0.1.0-py3-none-any.whl Python 3 none any Details for trackaudit-0.1.0-py3-none-any.whl

Total release size: 64.5 kB

Release files / trackaudit-0.1.0.tar.gz

Download URL trackaudit-0.1.0.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
46d65224087a4ce81fa538932ec1040fb90cd338386338ec21fa67e80f4b5be6
BLAKE2b-256 checksum
How to use checksums
c03804b5587a546f5ca5ef332dcd703536056176bd6a9dda1b84a270acc94086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release files / trackaudit-0.1.0-py3-none-any.whl

Download URL trackaudit-0.1.0-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27ec1a4c03e1b6c47a63adb4d95b58e0f5e29ac8b42e5d2ef2510f6a9f7c64bf
BLAKE2b-256 checksum
How to use checksums
bf3891a8baec9246d230f8cbd800c22a1e2c74e21a0c124a3e26a94a0ea5f8ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Security for trackaudit 0.1.0

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 trackaudit-0.1.0.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 Sep 7, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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