-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[sonos] Fix warnings and fix parsing of room name #15708
Conversation
d0a4926
to
bd9ef50
Compare
Short update: I'm struggling a bit with the |
2adc8a7
to
22715e2
Compare
1670b0d
to
61b30e4
Compare
Finally ready for review. I found an interesting behavior when writing the test for <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">
<item id="-1" parentID="-1" restricted="true">
<res protocolInfo="sonos.com-http:*:application/x-mpegURL:*" duration="0:03:33">x-sonosapi-hls-static:librarytrack%3ai.eoD8VQ5SZOB8QX7?sid=204&flags=8232&sn=9</res>
<r:streamContent/>
<r:radioShowMd/>
<r:streamInfo>bd:16,sr:22050,c:3,l:0,d:0</r:streamInfo>
<upnp:albumArtURI>/getaa?s=1&u=x-sonosapi-hls-static%3alibrarytrack%253ai.eoD8VQ5SZOB8QX7%3fsid%3d204%26flags%3d8232%26sn%3d9</upnp:albumArtURI>
<dc:title>Turn Down for What</dc:title>
<upnp:class>object.item.audioItem.musicTrack</upnp:class>
<dc:creator>DJ Snake & Lil Jon</dc:creator>
<upnp:album>Turn Down for What - Single</upnp:album>
</item>
</DIDL-Lite> will return album as "Turn Down for What - Single\n\t". This seems quite wrong, since the white space after the ending of the XML tag is included. However, it is outside the scope of this PR to fix/mess with. For that reason, to be on the safe side, I did a third commit to revert some white space changes, which could cause problems if put through the parser. |
I propose to merge after milestone 2. |
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.
Review of all except class SonosXMLParser
...enhab.binding.sonos/src/test/java/org/openhab/binding/sonos/internal/SonosXMLParserTest.java
Outdated
Show resolved
Hide resolved
e1aabec
to
fe08d4e
Compare
@lolodomo - gentle ping. Might be nice to include in next milestone for some additional testing. 🙂 |
I would prefer to test it myself before merging it for everyone. But I will finish my review soon. |
@lolodomo - ping, only in case you forgot. :) |
...g.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosXMLParser.java
Show resolved
Hide resolved
...g.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosXMLParser.java
Show resolved
Hide resolved
...g.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosXMLParser.java
Outdated
Show resolved
Hide resolved
...g.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosXMLParser.java
Show resolved
Hide resolved
fe08d4e
to
74ae093
Compare
c237737
to
7846ce9
Compare
ffcf1f5
to
2a06fbd
Compare
2a06fbd
to
5349d08
Compare
5349d08
to
a0f3d23
Compare
@jlaur : now that the problem with JUPnP impacting the Sonos binding is fixed, I will come back to you. |
a0f3d23
to
2c84947
Compare
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Fixes openhab#6793 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@lolodomo - sorry for pinging you again, just want to check if this PR is still on your review list? |
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.
LGTM, thank you.
I am going to deploy the changes and test before merging.
Tests are OK |
Thanks for the review and testing. |
* Fix warnings * Fix discovery error logging for offline devices Fixes openhab#6793 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This reverts commit 4e3cdba.
* Fix warnings * Fix discovery error logging for offline devices Fixes openhab#6793 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
* Fix warnings * Fix discovery error logging for offline devices Fixes openhab#6793 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix warnings * Fix discovery error logging for offline devices Fixes openhab#6793 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix warnings * Fix discovery error logging for offline devices Fixes openhab#6793 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Fix some compiler and checkstyle warnings:
Additionally:
Fixes #6793