Search code examples
androiddlnawindows-media-server

Is there any way that we can get last modified date from Cling - DIDLContent - containers?


I can list out all the Media servers and then browse folders/directories, videos etc using cling but could't find a way to get last modified date of containers. Is there any way to get the same? I don't think that Cling does provide it.


Solution

  • As of now the answer would be no. Cling library doesn't provide last modified date with the metadata for containers but they do provide the same for items. Below is the snippet that retrieves date modified for items from the abstract class Property.

    for (DIDLObject.Property property : container.getProperties()) { if (property != null && property.getDescriptorName().equals("date")) { String dateModified = property.getValue().toString(); if(!TextUtils.isEmpty(dateModified)){ folder.setDate(dateModified); } } }