문제

I'm trying to write a upnp/dlna client for videos and I would like to allow the option to sort by title and date.

With Windows7/wmp as the server, I can use "dc:title" or "dc:date" for sorting and it seems to work but testers have told me it doesn't work on other servers. Is there a universal way to know if sorting is allowed and what the sorting criteria should be?

Thanks.

도움이 되었습니까?

해결책

There is a way to query this (but be prepared for broken implementations that lie about their abilities as well). Quoting ContentDirectory service spec (v3):

2.3.3 SortCapabilities

This state variable is a CSV list of property names that the ContentDirectory service can use to sort Search() or Browse() action results. An empty string indicates that the device does not support any kind of sorting. A wildcard (“*”) indicates that the device supports sorting using all property names supported by the ContentDirectory service. The property names returned MUST include the appropriate namespace prefixes, except for the DIDL-Lite namespace. Properties in the DIDL-Lite namespace MUST always be returned without the prefix. All property names MUST be fully qualified using the double colon (“::”) syntax as defined in Section 2.2.20, “property”. For example, “upnp:foreignMetadata::fmBody::fmURI”

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top