1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 08:25:03 -05:00

* 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

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