Skip to content

feat(mpdclient): audio output query + enable/disable - #72

Open
susamn wants to merge 1 commit into
mainfrom
feature/mpd-outputs
Open

feat(mpdclient): audio output query + enable/disable#72
susamn wants to merge 1 commit into
mainfrom
feature/mpd-outputs

Conversation

@susamn

@susamn susamn commented Aug 27, 2026

Copy link
Copy Markdown
Owner

First slice of the casting feature (see plan). Isolated, no behaviour change.

What

internal/mpdclient/outputs.go wraps gompd's outputs / enableoutput / disableoutput behind typed domain methods, matching the existing call/callErr per-domain-file convention.

  • Output struct (typed ID/Name/Enabled/Plugin + raw per-plugin Attrs)
  • Outputs(), EnableOutput(id), DisableOutput(id)
  • HTTPDOutput() + ErrNoHTTPDOutput sentinel — casting needs an httpd stream to point devices at
  • parseOutputs unit tests

Why

Casting (Chromecast / Home Assistant / DLNA) enables MPD's httpd output while a cast is active and restores prior output state on stop. This is the MPD-side primitive for that.

Nothing calls these yet.

🤖 Generated with Claude Code

Adds internal/mpdclient/outputs.go wrapping gompd's outputs/enableoutput/
disableoutput behind typed domain methods, following the existing
call/callErr per-domain-file convention (playback.go, queue.go, ...).

- Output struct with typed ID/Name/Enabled/Plugin plus raw per-plugin Attrs
- Outputs(), EnableOutput(id), DisableOutput(id)
- HTTPDOutput() + ErrNoHTTPDOutput sentinel (errors.Is-able), for the
  upcoming casting feature which needs an httpd stream to point devices at
- parseOutputs unit tests

No behaviour change: nothing calls these yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JBJdG8Qenand5i16WT6BHG
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