* use starts-with-name logic for matching nfo files to movie files
This commit is contained in:
parent
30f05c1f9c
commit
d25bae2d42
|
@ -111,10 +111,10 @@ class MovieHashMatcher implements AutoCompleteMatcher {
|
||||||
|
|
||||||
// match movie info to movie files that match the nfo file name
|
// match movie info to movie files that match the nfo file name
|
||||||
SortedSet<File> siblingMovieFiles = new TreeSet<File>(filter(movieFiles, new ParentFilter(nfo.getParentFile())));
|
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) {
|
for (File movieFile : siblingMovieFiles) {
|
||||||
if (baseName.equalsIgnoreCase(stripReleaseInfo(getName(movieFile)))) {
|
if (stripReleaseInfo(getName(movieFile)).toLowerCase().startsWith(baseName)) {
|
||||||
movieByFile.put(movieFile, movie);
|
movieByFile.put(movieFile, movie);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue