* easy access to xattr metadata objects via naming scheme
This commit is contained in:
parent
95ff15d475
commit
7702844976
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue