Native foobar2000 component (Windows x64): reverse playlist lookup and playlist hygiene.
- Right-click track(s) → Find in Playlists submenu lists every playlist holding them; picking one jumps to the track there.
- Properties dialog shows a Playlists group with the same data (the SDK exposes rows in the existing Properties tab, not whole new tabs).
- Library → Find in Playlists submenu (all file-based, no popups):
- Find Playlists Containing Playing Track → report file.
- Collect Potential Duplicates into Playlist → tracks occurring 2+ times
anywhere (dead entries excluded) go to a
Potential Duplicatesplaylist (created once, missing tracks added on rerun). - Collect Tracks Not in Playlists → library tracks in no playlist go to a
Tracks Not in Playlistsplaylist. - Find Duplicates in Active Playlist → report file listing repeats.
- Find Dead Tracks in All Playlists → dry run: report file listing entries whose file is gone (streams skipped), changes nothing.
- Remove Dead Tracks from All Playlists → applies the dry-run list (per-playlist undo with Ctrl+Z).
- Export All Playlists to Folder... → asks for a folder, then a format (M3U8 for Rekordbox, or legacy M3U), and saves every playlist there (generated working lists excluded).
- Export Active Playlist to File... → save dialog for just the active playlist; the chosen extension decides the format.
- Reports land in
%TEMP%\foo_findplaylists_report.txt.
Use a release .fb2k-component file: foobar2000 → File → Preferences →
Components → Install, pick the file, restart when asked. For portable installs
the DLL can also be copied straight to user-components-x64\foo_findplaylists\.
Windows with VS Build Tools 2022 or Visual Studio 2022 (C++ workload), no IDE needed:
C:\Users\chris\fb2k-build\build.ps1 # local dev loop: mirror, build, test, packageor directly:
msbuild foo_findplaylists.vcxproj /p:Configuration=Release /p:Platform=x64Output: x64\Release\foo_findplaylists.dll. Components load at startup; there is
no hot reload. The dev loop is build, copy the DLL, restart foobar.
Pure logic lives in src/logic.* (no live foobar services) and is covered by
tests/ (assert runner, no framework). The build compiles with warnings as
errors (/WX). CI builds the DLL, builds the tests, runs them, and fails on
anything red. The Library menu commands double as integration tests: each writes
its findings to %TEMP%\foo_findplaylists_report.txt.
- C++ Formatting:
clang-format(configured via.clang-format). - Markdown / YAML / JSON:
prettier(configured via.prettierrc). - Commit Messages:
commitlintvalidating Conventional Commits format. - Complexity & CRAP Score:
scripts/check_quality.pycomputes Cyclomatic Complexity (McCabe) and CRAP (Change Risk Anti-Patterns) scores for all functions. - Git Hooks: Managed by Husky (
.husky/):pre-commit: runslint-stagedwithclang-formatandprettier.commit-msg: runscommitlinton the commit message.pre-push: runs the full lint and quality checks suite.
- Run checks manually:
npm run lint # runs format check + CRAP score / type safety analysis npm run format # formats C++, Markdown, and YAML files
- Version lives in one place:
FIP_VERSIONinsrc/version.h. - Changes are recorded in
CHANGELOG.md(Keep a Changelog 1.1.0: Added / Changed / Fixed) under[Unreleased]as they land. - Commits use Conventional Commits 1.0.0
prefixes (
feat:,fix:,docs:,refactor:,test:,ci:,chore:) so history stays scannable. - PR workflow: Every pull request automatically builds x64 Release binaries, executes the test suite, predicts the semantic version bump based on conventional commits, packages a testable
.fb2k-componentbundle uploaded to the Actions artifacts, and produces a release summary in GitHub Actions. - Automated semantic releases: When a PR is merged to
master, GitHub Actions automatically:- Inspects merged commits for conventional commit types (
feat:-> minor,fix:-> patch,BREAKING CHANGE:-> major). - Increments
FIP_VERSIONinsrc/version.hand updatesCHANGELOG.md. - Tags
v<version>and pushes the bump commit. - Builds and packages
foo_findplaylists-<version>.fb2k-componentwith SHA-256 checksums. - Publishes a GitHub Release with:
- Direct download link and installation instructions for foobar2000.
- Curated changelog section from
CHANGELOG.md. - Automatically categorized release notes based on the previous release.
- Inspects merged commits for conventional commit types (
- Manual triggers via GitHub Actions
workflow_dispatch(with bump type selector: auto, patch, minor, major) are also supported.
src/— component source (foo_findplaylists.cpp), pure logic (logic.*), version (version.h).tests/— unit tests for the pure logic.sdk/— vendored foobar2000 SDK (headers + libs the build references).