0

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.

Adnan Y
  • 2,982
  • 1
  • 26
  • 29
Wells
  • 91
  • 7

2 Answers2

1

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); } } }
Wells
  • 91
  • 7
  • Hello, Can you please tell me how can we add extra property to DIDLObject of cling? I want to add another URL of video in same code. – AndiM Feb 19 '18 at 11:18
0

I remember there has not contain last modified date in the metadata. If you already get the DIDLContent then you can try Item->Res. The detail info defines in the Res class.

Kevin Shen
  • 56
  • 2
  • Thank you Kevin for your reply. Yea, containers are not provided with date modified it seems but properties do provide date related info for items still the sad part is not for containers. – Wells Jan 20 '15 at 04:27
  • for (DIDLObject.Property property : container.getProperties()) { if (property != null && property.getDescriptorName().equals(DLNAConstants.DATE)) { String dateModified = property.getValue().toString(); if(!TextUtils.isEmpty(dateModified)){ folder.setDate(dateModified); } } } – Wells Jan 20 '15 at 04:28