INTERACT FORUM

Please login or register.

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

Author Topic: [Request] DLNA - Support Search command  (Read 5992 times)

Streaker

  • Regular Member
  • Recent member
  • *
  • Posts: 35
[Request] DLNA - Support Search command
« on: September 29, 2010, 10:32:26 am »

Currently MC's DLNA support does not appear to include support for searching. Calling GetSearchCapabilites comes back suggesting support for only artist, but even then doing a search returns instantly with no results. Do you plan to support this DLNA Search feature?

Reference:
UPnP-av-ContentDirectory-v2-Service-20060531.pdf Section "2.5.7 Search"

http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBIQFjAA&url=http%3A%2F%2Fwww.upnp.org%2Fspecs%2Fav%2FUPnP-av-ContentDirectory-v2-Service-20060531.pdf&rct=j&q=upnp%20contentdirectory%20searchcriteria&ei=51mjTPmiNsX9ngeDtOWIBA&usg=AFQjCNHw1JqALnnF2iL9kMl4JznJzioivQ&sig2=aKExiDaI8USXgaK30pUetQ

Thanks,
~Tom


Here's some command line debug output of a search attempt against a MC Generic DLNA instance:
---
Note: Ideally, one would be able to do searches such as:
(dc:title contains "woke") or (dc:creator contains "woke") or (upnp:artist contains "woke") or (upnp:genre contains "woke") or (upnp:album contains "woke")
and also be able to filter the results by folder by setting the ContainerId
---

curl -v  --header "Content-Type: text/xml charset='utf-8'" --header "SOAPACTION: 'urn:schemas-upnp-org:service:ContentDirectory:1#Search'" -d '<?xml version="1.0" encoding="UTF-8" ?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><s:Body><u:Search xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ContainerID>0</ContainerID><SearchCriteria>(upnp:artist contains "woke")</SearchCriteria><Filter>*</Filter><StartingIndex>0</StartingIndex><RequestedCount>10</RequestedCount><SortCriteria>+dc:title</SortCriteria></u:Search></s:Body></s:Envelope>' http://192.168.1.103:52101/ContentDirectory/control
* About to connect() to 192.168.1.103 port 52101 (#0)
*   Trying 192.168.1.103... connected
* Connected to 192.168.1.103 (192.168.1.103) port 52101 (#0)
> POST /ContentDirectory/control HTTP/1.1
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
> Host: 192.168.1.103:52101
> Accept: */*
> Content-Type: text/xml charset='utf-8'
> SOAPACTION: 'urn:schemas-upnp-org:service:ContentDirectory:1#Search'
> Content-Length: 710
>
< HTTP/1.1 500 Internal server error
< Server: Microsoft-Windows-XP/2002, UPnP/1.0, JRiver UPnP/1.0
< Date: Wed, 29 Sep 2010 15:12:39 GMT
< Content-Length: 379
< Content-Type: text/xml; charset=utf-8
<
<?xml version="1.0" encoding="UTF-8" ?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<s:Body>
<u:SearchResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"/>
</s:Body>
</s:Envelope>
* Connection #0 to host 192.168.1.103 left intact
* Closing connection #0
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: [Request] DLNA - Support Search command
« Reply #1 on: September 29, 2010, 03:17:43 pm »

The Media Center DLNA server does support search.

For example, you can search for all audio items like this:
Container: 0
SearchCriteria: (upnp:class derivedfrom "object.item.audioItem")
Filter: *

This is how one Media Center connects to another Media Center using DLNA.
Logged
Matt Ashland, JRiver Media Center

Streaker

  • Regular Member
  • Recent member
  • *
  • Posts: 35
Re: [Request] DLNA - Support Search command
« Reply #2 on: September 29, 2010, 04:37:55 pm »

Ah, (upnp:class derivedfrom "object.item.audioItem") worked :) Thanks for the quick response.

Based on that, here's what I found:
1: (upnp:class derivedfrom "object.item.audioItem") and upnp:artist contains "prince" - works
2: upnp:artist contains "prince" - fails was expecting prince videos and audio and images
3: (upnp:class derivedfrom "object.item.audioItem") and upnp:genre contains "acoustic" - appears to work (even though a call to MC for GetSearchCapabilities doesn't claim upnp:genre as one of the supported fields)
3: (upnp:class derivedfrom "object.item.audioItem") and upnp:album contains "purple" - fails
4: I can't seem to find any way to get a title search working

It seems that for MC, a derivedfrom expression is required.  I wouldn't have expected from the spec that it would be required to have a derivedfrom expression in order to do a search, since a search may be for items of all types.

So, unless it's my user error (always a strong possibility), I think the support is not complete out enough to support general item search support across all object.item types and the other common search fields (album, title), which is what I was hoping for, so that MC "just works" when hit from a upnp client that supports search. If the support is indeed not there, I hope you will consider this feature request.

~Tom
Logged
Pages: [1]   Go Up