-
Notifications
You must be signed in to change notification settings - Fork 231
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
Preliminary speaker info with more information #335
Conversation
My guess is that |
It would be nice to also have, memory, flash, ampOnTime. Also an option to get the full url to the icon i.e. full_urls=True. Failing on 2.6 - soco/core.py line 1099 -- I am doing something similar in my helper library but I encode the response from requests using .encode('UTF-8'). Translating to your code... dom = XML.fromstring(response.content.encode('UTF-8')) This was cannibalized from the commented out code @ soco/core.py def uid my helper lib is https://bitbucket.org/dundeemt/chilledsoco/src/66be490323f863eabd6ac3e4fdbd8419b4a12372/chilled.py?at=default class DeviceProperties |
The question is whether memory, flash,..etc. is really all that important or if we are starting to pollute the speaker_info-dict. For now you can always build the full url with the |
There is a bug in path support in python 2.6. We had some previous discussion about it here: #154 (You may need to view comments on outdated diffs to see it):
One way to handle it might be to find the I don't mind including memory, flash etc (though I can't image why anyone would need them), but I'm not keen on the full_urls idea. I agree with @the01 that this can easily be done by the user by combining with the ip address if necessary. Lawrence |
full_urls @lawrenceakka @the01 is a common idiom in soco. The argument against it here is the same that could be made else where browse/ search/ and variants have a parameter to specify the full url is returned. I bring it up for consistency. As for, those other things in device_description.xml, I can see the point about not polluting the get_speaker_info return structure, but offering access to all of that information, somewhere would be a good thing. Perhaps, that c/sh ould be a different feature request and pr. |
Maybe I will have another go at the whole 2.6 tests later, though my only way to test this is to do a commit and let travis to its thing. Which is not really optimal for debuging purposes (and makes for an interesting git history 😄 ). So it would be greatly appreciated if someone with a working 2.6 installation could have a look. Maybe a |
Alrigth, the tests finally surrendered, we are good to go 😉 |
+1 from me. Please squash a few of the commits, and I'll commit. Separate PRs for absolute URIs, and for additional info (which I think should be in the same dict), are welcome |
…player_icon; added model_number; added model_name; added display_version;
Down to only a single commit |
Preliminary speaker info with more information
Thanks very much for this. Please make sure to add a comment on #332 which we will use to create release notes |
Updated the
get_speaker_info()
function to parsexml/device_description.xml
as described in #320No unit tests yet