INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: UPnP labeling for composer?  (Read 552 times)

mattlovell

  • Galactic Citizen
  • ****
  • Posts: 310
UPnP labeling for composer?
« on: April 30, 2023, 11:09:03 am »

Hello,

My intent with this question is to get my JRiver library's "Composer" information successfully conveyed to Kodi...

Peeking via Wireshark, it seems that JRiver currently (and, no doubt, correctly) sends composer information via a upnp:author label (for lack of a better word) as part of SetAVTransportURI.  See the line highlighted below via the text arrow:

Code: [Select]
<u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<CurrentURI>http://10.0.0.3:52100/Music/F14114520.flac</CurrentURI>
<CurrentURIMetaData>&lt;DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dlna="urn:schemas-dlna-org:device-1-0" xmlns:av="urn:schemas-sony-com:av" xmlns:pv="http://www.pv.com/pvns/" xmlns:jriver="urn:schemas-jriver-com:jriver"&gt;
&lt;item id="F14114520" parentID="0" restricted="1"&gt;
&lt;dc:title&gt;33 Variations in C Major, Op. 120 on a Waltz by Diabelli: Tema. Vivace&lt;/dc:title&gt;
&lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;
&lt;upnp:artist&gt;Mitsuko Uchida/Dominic Fyfe/Dominic Fyfe/Everett Porter/Everett Porter/Everett Porter/Everett Porter/Jaap van Stenis/Jaap van Stenis&lt;/upnp:artist&gt;
&lt;upnp:artist role="Performer"&gt;Mitsuko Uchida/Dominic Fyfe/Dominic Fyfe/Everett Porter/Everett Porter/Everett Porter/Everett Porter/Jaap van Stenis/Jaap van Stenis&lt;/upnp:artist&gt;
&lt;upnp:artist role="AlbumArtist"&gt;Mitsuko Uchida&lt;/upnp:artist&gt;
&lt;dc:creator&gt;Mitsuko Uchida/Dominic Fyfe/Dominic Fyfe/Everett Porter/Everett Porter/Everett Porter/Everett Porter/Jaap van Stenis/Jaap van Stenis&lt;/dc:creator&gt;
&lt;upnp:album&gt;Beethoven: Diabelli Variations&lt;/upnp:album&gt;
&lt;upnp:genre&gt;Classical&lt;/upnp:genre&gt;
&lt;upnp:author role="Composer"&gt;Ludwig van Beethoven&lt;/upnp:author&gt;      <-----
&lt;upnp:originalTrackNumber&gt;1&lt;/upnp:originalTrackNumber&gt;
&lt;dc:publisher&gt;Decca&lt;/dc:publisher&gt;
&lt;upnp:playbackCount&gt;15&lt;/upnp:playbackCount&gt;
&lt;dc:date&gt;2021-01-01T00:00:00&lt;/dc:date&gt;
&lt;pv:playcount&gt;15&lt;/pv:playcount&gt;
&lt;pv:lastPlayedTime&gt;2023-04-30T09:26:04&lt;/pv:lastPlayedTime&gt;
&lt;pv:addedTime&gt;1670795195&lt;/pv:addedTime&gt;
&lt;pv:modificationTime&gt;1670795823&lt;/pv:modificationTime&gt;
&lt;upnp:albumArtURI dlna:profileID="JPEG_LRG"&gt;http://10.0.0.3:52100/AArl/14114520.jpg&lt;/upnp:albumArtURI&gt;
&lt;upnp:albumArtURI dlna:profileID="JPEG_MED"&gt;http://10.0.0.3:52100/AArm/14114520.jpg&lt;/upnp:albumArtURI&gt;
&lt;upnp:albumArtURI dlna:profileID="JPEG_SM"&gt;http://10.0.0.3:52100/AArs/14114520.jpg&lt;/upnp:albumArtURI&gt;
&lt;upnp:albumArtURI dlna:profileID="JPEG_TN"&gt;http://10.0.0.3:52100/AArt/14114520.jpg&lt;/upnp:albumArtURI&gt;
&lt;res protocolInfo="http-get:*:audio/x-flac:DLNA.ORG_PN=FLAC;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000" duration="0:00:53.000" size="3241194" nrAudioChannels="2" sampleFrequency="44100" bitsPerSample="16" bitrate="60500"&gt;http://10.0.0.3:52100/Music/F14114520.flac&lt;/res&gt;
&lt;res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG"&gt;http://10.0.0.3:52100/ARrl/14114520.jpg&lt;/res&gt;
&lt;res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED"&gt;http://10.0.0.3:52100/ARrm/14114520.jpg&lt;/res&gt;
&lt;res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;"&gt;http://10.0.0.3:52100/ARrs/14114520.jpg&lt;/res&gt;
&lt;res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN"&gt;http://10.0.0.3:52100/ARrt/14114520.jpg&lt;/res&gt;
&lt;/item&gt;
&lt;/DIDL-Lite&gt;
</CurrentURIMetaData>
</u:SetAVTransportURI>


I don't know the Kodi (xbmc) codebase particularly well.  I believe it makes use of a library named PlatinumUPnP for its DLNA support.  Poking around on github, the following lines from

   xbmc/xbmc/network/upnp/UPnPServer.cpp
   https://github.com/xbmc/xbmc/blob/54e9471bc6fbfdd978addab0f31aa0b34990c2d4/xbmc/network/upnp/UPnPServer.cpp#LL942C1-L950C1

seem relevant:

Code: [Select]
        // look for artist, album & genre filters
        NPT_String genre = FindSubCriteria(searchClass, "upnp:genre");
        NPT_String album = FindSubCriteria(searchClass, "upnp:album");
        NPT_String artist = FindSubCriteria(searchClass, "upnp:artist");
        // sonos looks for microsoft specific stuff
        artist = artist.GetLength()?artist:FindSubCriteria(searchClass, "microsoft:artistPerformer");
        artist = artist.GetLength()?artist:FindSubCriteria(searchClass, "microsoft:artistAlbumArtist");
        artist = artist.GetLength()?artist:FindSubCriteria(searchClass, "microsoft:authorComposer");

The PlatinumPnP library seems setup to look solely for upnp:artist; I've found no references yet to upnp:author.  Interestingly, the lines above also reference some obviously Microsoft-specific labels (for Sonos?).

So, to my question for the JRiver folks ...

Would it be at all possible to provide options within the JRiver library regarding how (if it's applicable at all) a field gets labeled/tagged when using UPnP?  For my specific scenario, I would really like to see if JRiver sent

    <upnp:artist role="Composer">Ludwig van Beethoven</upnp:artist>

rather than

    <upnp:author role="Composer">Ludwig van Beethoven</upnp:author>

would get that string then get passed through to Kodi's InfoLabels properly.  Haphazard changes to UPnP labeling could clearly break things terrible.  Here, though, I'm thinking of just an option between whether the composer is an "author" or an "artist" for UPnP.

Kodi's InfoLabels appear to have several different Roles supported, some more natural than others:
  • MusicPlayer.Property(Role.Composer)
  • MusicPlayer.Property(Role.Conductor)
  • MusicPlayer.Property(Role.Orchestra)  !!

It would be great to see if I could make any use of them.

Thanks,
  Matt
Logged
Pages: [1]   Go Up