diff --git a/source/net/sourceforge/filebot/ui/rename/RenameListCellRenderer.java b/source/net/sourceforge/filebot/ui/rename/RenameListCellRenderer.java index c30f63a7..c65bbc34 100644 --- a/source/net/sourceforge/filebot/ui/rename/RenameListCellRenderer.java +++ b/source/net/sourceforge/filebot/ui/rename/RenameListCellRenderer.java @@ -16,6 +16,8 @@ import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; import java.io.File; import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; import javax.swing.DefaultListCellRenderer; import javax.swing.JList; @@ -24,6 +26,7 @@ import javax.swing.border.EmptyBorder; import net.miginfocom.swing.MigLayout; import net.sourceforge.filebot.ResourceManager; +import net.sourceforge.filebot.media.MediaDetection; import net.sourceforge.filebot.similarity.Match; import net.sourceforge.filebot.similarity.MetricCascade; import net.sourceforge.filebot.similarity.MetricMin; @@ -218,13 +221,22 @@ class RenameListCellRenderer extends DefaultFancyListCellRenderer { protected String getType(File file) { - if (file.isDirectory()) + if (file.isDirectory()) { return "Folder"; + } + + try { + if (MediaDetection.getClutterFileFilter().accept(file)) { + return "Sample"; + } + } catch (Exception e) { + Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage()); + } String extension = FileUtilities.getExtension(file); - - if (extension != null) + if (extension != null) { return extension.toLowerCase(); + } // some file with no extension return "File"; diff --git a/website/data/exclude-blacklist.txt b/website/data/exclude-blacklist.txt index 0bb4bb3f..64760be9 100644 --- a/website/data/exclude-blacklist.txt +++ b/website/data/exclude-blacklist.txt @@ -3,6 +3,7 @@ (sample|trailer)- (sample|trailer)[.] -(sample|trailer) +-s[.] \((sample|trailer)\) \[(sample|trailer)\] ^(sample|trailer) \ No newline at end of file