From 2bee69d7328e60a881a840928591a3d4b4cdf7d5 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 2 Feb 2016 17:22:24 +0000 Subject: [PATCH] Use xattr metadata from the given file as info object when evaluating file filter expressions on files --- source/net/filebot/format/ExpressionFileFilter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/format/ExpressionFileFilter.java b/source/net/filebot/format/ExpressionFileFilter.java index 04ce7b8f..dd69d6c6 100644 --- a/source/net/filebot/format/ExpressionFileFilter.java +++ b/source/net/filebot/format/ExpressionFileFilter.java @@ -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;