-
Notifications
You must be signed in to change notification settings - Fork 120
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
commands() returns commands which are not available #101
Comments
Can you do connect with netcat and then type $ nc -v localhost 6600
OK MPD 0.20.0
commands
command: add
command: addid
command: addtagid
command: channels
command: clear
command: clearerror
command: cleartagid
command: close
command: commands
command: config
command: consume
command: count
... |
What is the output of:
It my version it look as expected. |
Using netcat, the server returns those three commands as well (sticker, unmount, volume).
Thanks for the lightning fast reply btw. |
The following code shows the correct result: from mpd import MPDClient
mpc = MPDClient()
mpc.connect('127.0.0.1', port=6600)
print(set(mpc.commands()) & set(dir(mpc))) |
Yes, that shows me what commands are available. But shouldn't mpc.commands() do that as well? |
Your code was not correct. Using |
I don't understand. Isn't
As you can see, this list includes among others
|
In python-mpd2 there is Line 309 in d9860f4
|
Aaaah, I see. So basically commands() just lists the commands that the server makes available to clients, not necessarily commands that are available through python-mpd2. |
The documentation for commands() states that it returns "commands the current user has access to." However, after initiating an MPDClient object, I get several commands which have not been bound yet or do not exist at all.
This outputs:
The text was updated successfully, but these errors were encountered: