philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.5k stars 216 forks source link

DIDL metadata missing? #242

Closed timtn closed 4 years ago

timtn commented 4 years ago

Hey Philippe, Playing around with airupnp and noticed that metadata portion seems to be blank on DIDL even if the metadata option is enabled and metadata is available/displayed on handle_rtsp:574: received metadata

AVTSetURI:89 [0x10e52ee00]: DIDL header: <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">
<item id="1" parentID="0" restricted="1">
<dc:title></dc:title>
<dc:creator></dc:creator>
<upnp:album></upnp:album>
<upnp:channelName></upnp:channelName>
<upnp:channelNr>0</upnp:channelNr>
<upnp:class>object.item.audioItem.audioBroadcast</upnp:class>
<res protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=00;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000">http://192.168.10.142:51817/stream.mp3:320</res>
</item>
</DIDL-Lite>

Could we get the title to default to "Streaming from AirConnect" if none is provided/available?

philippe44 commented 4 years ago

You can't get AirPlay metadata sent to a UPnP player, unless you use mp3/aac and ICY. The reason is that in AirPlay, the metadata arrives after streaming has started and UPnP requires it to be send together with the UPnP SetURI command. Now, I can add the fixed string even for non Sonos devices as well

timtn commented 4 years ago

That makes sense! Is there any reason why MetaData->remote_title is empty in CreateDIDL?

philippe44 commented 4 years ago

no, not AFAIR and that's what I will change

philippe44 commented 4 years ago

it's in now

timtn commented 4 years ago

it's in now

Works great! Thanks for the fix!