mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 16:58:51 -05:00
Fix getMediaInfo() issues
This commit is contained in:
parent
fb17c4feae
commit
a42ee00b57
@ -434,15 +434,17 @@ public abstract class ScriptShellBaseClass extends Script {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getMediaInfo(File file, String format) throws Exception {
|
public String getMediaInfo(File file, String format) throws Exception {
|
||||||
try {
|
ExpressionFormat formatter = new ExpressionFormat(format);
|
||||||
|
|
||||||
Object o = xattr.getMetaInfo(file);
|
Object o = xattr.getMetaInfo(file);
|
||||||
File f = file.getCanonicalFile();
|
File f = file.getCanonicalFile();
|
||||||
|
|
||||||
ExpressionFormat formatter = new ExpressionFormat(format);
|
try {
|
||||||
return formatter.format(new MediaBindingBean(o, f));
|
return formatter.format(new MediaBindingBean(o, f));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
debug.warning("Failed to read media info: " + e);
|
debug.warning("Failed to read media info: " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user