Use xattr metadata from the given file as info object when evaluating file filter expressions on files

This commit is contained in:
Reinhard Pointner 2016-02-02 17:22:24 +00:00
parent c3decda9cb
commit 2bee69d732
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
package net.filebot.format;
import static net.filebot.media.MediaDetection.*;
import java.io.File;
import java.io.FileFilter;
import java.util.logging.Level;
@ -22,7 +24,7 @@ public class ExpressionFileFilter implements FileFilter {
@Override
public boolean accept(File f) {
try {
return filter.matches(new MediaBindingBean(f, f));
return filter.matches(new MediaBindingBean(readMetaInfo(f), f, null));
} catch (Exception e) {
Logger.getLogger(ExpressionFileFilter.class.getName()).log(Level.WARNING, e.toString());
return errorResult;