Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fix improves the handling of field r:StreamContent when streaming e.g. radio stations. In case of my favorite station there isn't always a parseable artist/title combination available. Instead, only the name of the radio station is included (see below).
{ '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: [Object], 'r:streamContent': 'Bremen Vier', 'r:radioShowMd': 'HeuckZeug,p270647', 'upnp:albumArtURI': '/getaa?s=1&u=x-sonosapi-stream%3as25565%3fsid%3d254%26flags%3d8224%26sn%3d0', 'dc:title': 'x-sonosapi-stream:s25565?sid=254&flags=8224&sn=0', 'upnp:class': 'object.item' } } }
This is currently parsed as follows:
This is not nice for displaying it in my smarthome software.
The fix adds the stream content to the artist even if the content cannot be split. Additionally, 'r:radioShowMd' is parsed and added to the title. The result is this: