I'm looking for a way to browse my DLNA server and I can't seem to find any documentation on how to browse and filter specific items. Put simply, this is what I want to do: get all music artists on the server, get all music albums on the server, get all music albums of a music artist, get all music tracks for a specific album. Is this possible?
I know that I could simply build a file directory browser to browse the server, but I'm working on something that attempts to obscure filesystem layout to the user. Is there a DLNA spec o开发者_开发知识库ut there somewhere that I can work with?
The folder structure exposed by your DLNA server does not have to (and normally not) be mapped to the actual folder structure on the file system.
For example, "get all music artists on the server", You can expose the a virtual folder (container) called "artists", and the children of the container are list of the artist.
How to implement that? For example, some DLNA server has an database to store all the meta information of imported files. When server imports the files on the file system, it parses file to get metadata like artist, album, genre ... When end user requests children your "artists" container, DLNA server will do a search on the database and to get the result.
Basically, I defaulted over to using the "Search" UPnP-ContentDirectory action. When it does work, it works well, but the problem is that most servers don't implement simple search functionality since it's not required by the UPnP specification
, which, of course is the lamest thing ever. Welcome to the world of UPnP.
精彩评论