* easy access to xattr metadata objects via naming scheme

This commit is contained in:
Reinhard Pointner 2013-04-01 10:36:32 +00:00
parent 95ff15d475
commit 7702844976
1 changed files with 18 additions and 0 deletions

View File

@ -347,6 +347,12 @@ public class MediaBindingBean {
}
@Define("xattr")
public Object getMetaAttributesObject() {
return getMetaAttributesObject(mediaFile);
}
@Define("crc32")
public String getCRC32() throws IOException, InterruptedException {
// use inferred media file
@ -805,4 +811,16 @@ public class MediaBindingBean {
return null;
}
private Object getMetaAttributesObject(File file) {
if (useExtendedFileAttributes()) {
try {
return new MetaAttributes(file).getMetaData();
} catch (Throwable e) {
// ignore
}
}
return null;
}
}