feat(mpdclient): audio output query + enable/disable - #72
Open
susamn wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First slice of the casting feature (see plan). Isolated, no behaviour change.
What
internal/mpdclient/outputs.gowraps gompd'soutputs/enableoutput/disableoutputbehind typed domain methods, matching the existingcall/callErrper-domain-file convention.Outputstruct (typedID/Name/Enabled/Plugin+ raw per-pluginAttrs)Outputs(),EnableOutput(id),DisableOutput(id)HTTPDOutput()+ErrNoHTTPDOutputsentinel — casting needs an httpd stream to point devices atparseOutputsunit testsWhy
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