New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: MPD server #487
base: master
Are you sure you want to change the base?
feat: MPD server #487
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comments to not forget things, since I took a quick look with fresh eyes.
return c.srv.jukebox.TogglePlay() | ||
|
||
case state == "1" || state == "0": | ||
return c.srv.jukebox.SetPlay(state == "0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename state
to pause
to make the comparison clear.
return c.srv.jukebox.SetPlay(state == "0") | ||
|
||
default: | ||
return c.newErr(ackErrorArg, fmt.Errorf("play state must be 0 or 1, got: %s", state)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return c.newErr(ackErrorArg, fmt.Errorf("play state must be 0 or 1, got: %s", state)) | |
return c.newErr(ackErrorArg, fmt.Errorf("pause state must be 0 or 1, got: %s", state)) |
} | ||
|
||
func doCmd(c *client, name string, args *argParser) error { | ||
fmt.Println("->", args.line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be removed/made into a proper log.
) | ||
|
||
const ( | ||
protocolVersion = "0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put something here when enough of the protocol is supported.
Hi,
I did this as a proof-of-concept. There's no docs, not enough tests and comments, and what's actually implemented from the MPD API is pretty minimal. So I've marked this as a draft and wanted to get feedback before spending any more time on it.
The end goal for me is to be able to control the jukebox via any MPD client, since the jukebox support of Subsonic clients, is subpar from my experience. Ideally in the end being able to steal the queue from device to device, like is possible on the streaming giants.
Please let me know if this is something you'd be interested in merging. I'm willing to handle maintenance/future issues that pop up.