* use starts-with-name logic for matching nfo files to movie files

This commit is contained in:
Reinhard Pointner 2012-07-11 20:22:09 +00:00
parent 30f05c1f9c
commit d25bae2d42
1 changed files with 2 additions and 2 deletions

View File

@ -111,10 +111,10 @@ class MovieHashMatcher implements AutoCompleteMatcher {
// match movie info to movie files that match the nfo file name
SortedSet<File> siblingMovieFiles = new TreeSet<File>(filter(movieFiles, new ParentFilter(nfo.getParentFile())));
String baseName = stripReleaseInfo(getName(nfo));
String baseName = stripReleaseInfo(getName(nfo).toLowerCase());
for (File movieFile : siblingMovieFiles) {
if (baseName.equalsIgnoreCase(stripReleaseInfo(getName(movieFile)))) {
if (stripReleaseInfo(getName(movieFile)).toLowerCase().startsWith(baseName)) {
movieByFile.put(movieFile, movie);
}
}