* improve subtitle/nfo matching here as well

This commit is contained in:
Reinhard Pointner 2012-07-25 20:45:58 +00:00
parent 7cc54fc59e
commit faea58b7c7
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}