Skip to content

Spotify-only rework: account selection, status/setup CLI, ~/.tapdeck config#8

Merged
codybrom merged 12 commits into
mainfrom
spotify-only-cli
Jun 1, 2026
Merged

Spotify-only rework: account selection, status/setup CLI, ~/.tapdeck config#8
codybrom merged 12 commits into
mainfrom
spotify-only-cli

Conversation

@codybrom

@codybrom codybrom commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Reworks tapdeck around a streamlined Spotify-only flow with real setup/diagnostics. Split into focused commits (one logical change each) for review.

Highlights

  • spotify_account_sn + discovery — pick which linked Spotify account to play from; getSpotifyAccounts mines favorites and room queues for the account serials. (Fixes a latent bug: hard-coded sn=1 was wrong on multi-account systems.)
  • tapdeck status — confirms it can reach Sonos and lists rooms (+IPs) and Spotify accounts. The pre-setup diagnostic.
  • tapdeck setup — interactive: discovers the system, asks room + account, writes ~/.tapdeck/config.json, offers pm2 autostart. A fresh install with no config runs it automatically.
  • Config at ~/.tapdeck/config.json (or cwd usersettings.json for dev); defaults + coercion centralized in resolveSettings. The bundled example file is removed in favor of setup + the README schema.
  • XML decoder fix — decodes all numeric character references (e.g. Café), still hand-rolled with zero runtime dependencies.
  • Lazy libpcsclite load so status/setup run on machines without the reader library.

⚠️ Breaking change

favorite: and playlist: tags are no longer supported — tapdeck is Spotify-only. Spotify track/album/playlist URIs, room:, and command: tags are unchanged.

Permissions

The binary moves from read-only to also requiring --allow-write (setup writes config), --allow-run=pm2 (optional autostart), and +HOME env (config location). Updated in deno.json and release.yml.

Commits

  1. style: deno fmt 2. chore(editor): VS Code config 3. build: widen perms
  2. feat(config): settings module 5. fix(xml): numeric entities 6. refactor(nfc): lazy libpcsclite
  3. feat(spotify): account selection 8. feat(sonos): account discovery + status helpers; drop favorites engine
  4. feat!: Spotify-only dispatch 10. feat(pm2): autostart helper 11. feat(cli): status/setup 12. docs:

Two commits are file-scoped where one file carries closely-related sub-changes (system.ts bundles account-discovery with the favorites-engine removal; index.ts bundles status/setup/first-run) — interactive hunk-splitting wasn't available; happy to split further on request.

Validation

deno fmt --check, deno lint, deno check, deno task test (41 passing) all green. status verified live against hardware; the interactive setup/pm2 path needs a TTY and wasn't exercised end-to-end in CI.

@codybrom codybrom self-assigned this Jun 1, 2026
@codybrom codybrom merged commit cc9d75a into main Jun 1, 2026
1 check passed
@codybrom codybrom deleted the spotify-only-cli branch June 1, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant