From faea58b7c7abb54dab00ade9e074210ed4ea77fa Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 25 Jul 2012 20:45:58 +0000 Subject: [PATCH] * improve subtitle/nfo matching here as well --- source/net/sourceforge/filebot/format/MediaBindingBean.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/sourceforge/filebot/format/MediaBindingBean.java b/source/net/sourceforge/filebot/format/MediaBindingBean.java index 6f66e071..b612e629 100644 --- a/source/net/sourceforge/filebot/format/MediaBindingBean.java +++ b/source/net/sourceforge/filebot/format/MediaBindingBean.java @@ -517,11 +517,11 @@ public class MediaBindingBean { if (SUBTITLE_FILES.accept(mediaFile) || getDefaultFilter("application/nfo").accept(mediaFile)) { // file is a subtitle - String baseName = stripReleaseInfo(FileUtilities.getName(mediaFile).toLowerCase()); + String baseName = stripReleaseInfo(FileUtilities.getName(mediaFile)).toLowerCase(); // find corresponding movie file for (File movieFile : mediaFile.getParentFile().listFiles(VIDEO_FILES)) { - if (baseName.startsWith(stripReleaseInfo(FileUtilities.getName(movieFile)).toLowerCase())) { + if (stripReleaseInfo(FileUtilities.getName(movieFile)).toLowerCase().startsWith(baseName)) { return movieFile; } }