-
Notifications
You must be signed in to change notification settings - Fork 37
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
Accessing service description from UpnpDevice #24
Comments
Certainly. Also, I'll store it on to the UpnpService and other relevant parts (UpnpActions/UpnpStateVariables). I think you want to parse the additional properties. I'm thinking if we shouldn't (also) parse these in |
I think one way would be to store the encountered, non-standard elements into a parsed So on songpal's end the call would look something like:
for
Or would it even make sense to store the whole parse-tree as such (and provide those existing shortcuts based on that)? I think it's your call what's the most sane way to do this, I'd be perfectly happy with any solution that lets me read that data out without reparsing it myself :-) |
Not sure how far we should take this, so for now I'll just store an attribute called If so, do you want me to release |
Ok, that's fine, too. I experimented with it a bit (rytilahti/python-songpal#35) and stumbled upon a couple of things:
Anyway, a new release including the exposed xml would be great! |
Are you looking for this, with regard to point two?
|
Oops, yes, that's what I was using already (the pretty-printing part was caused by printing out bytes instead of a string). It does seem to mangle the namespaces (uses ns[0-9] instead of the original ones), but it's just debug info so that's fine. |
Released 0.13.5. modelNumber is not included though... next release. |
Released 0.13.6. modelNumber and some friends are now exposed. |
Closing the issue. If there is anything else please let me know. |
Thanks, that'll clean up my parsing code a bit (no need to define the 'device' namespace nor parse it separately)! |
Thank you for the review. |
Hi Steven,
it would be nice if there would be a way to access the XML tree of the parsed device description. In my case I would like to access some custom elements (see https://github.com/rytilahti/python-songpal/blob/master/songpal/main.py#L180). Do you think it'd be feasible to pass the parsed tree onwards to UPnpDevice?
The text was updated successfully, but these errors were encountered: