Fix "Ip Man 3 FR"
@see https://www.filebot.net/forums/viewtopic.php?f=6&t=3546#p19839
This commit is contained in:
parent
153e87a4c6
commit
5151bd8c7f
|
@ -611,8 +611,8 @@ public class MediaDetection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// search by file name or folder name
|
// search by file name or folder name (initialize with known options)
|
||||||
Collection<String> terms = new LinkedHashSet<String>();
|
Set<String> terms = options.stream().map(Movie::getNameWithYear).collect(toCollection(LinkedHashSet::new));
|
||||||
|
|
||||||
// 1. term: try to match movie pattern 'name (year)' or use filename as is
|
// 1. term: try to match movie pattern 'name (year)' or use filename as is
|
||||||
terms.add(getName(movieFile));
|
terms.add(getName(movieFile));
|
||||||
|
@ -745,11 +745,11 @@ public class MediaDetection {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Movie> sortMoviesBySimilarity(Collection<Movie> options, Collection<String> terms) throws Exception {
|
public static List<Movie> sortMoviesBySimilarity(Collection<Movie> options, Collection<String> terms) throws Exception {
|
||||||
Collection<String> paragon = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
|
Set<String> paragon = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
|
||||||
paragon.addAll(stripReleaseInfo(terms, true));
|
paragon.addAll(stripReleaseInfo(terms, true));
|
||||||
paragon.addAll(stripReleaseInfo(terms, false));
|
paragon.addAll(stripReleaseInfo(terms, false));
|
||||||
|
|
||||||
return sortBySimilarity(options, paragon, getMovieMatchMetric(), SearchResult::getEffectiveNames);
|
return sortBySimilarity(options, paragon, getMovieMatchMetric());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEpisodeNumberMatch(File f, Episode e) {
|
public static boolean isEpisodeNumberMatch(File f, Episode e) {
|
||||||
|
@ -778,7 +778,7 @@ public class MediaDetection {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Collection<String> reduceMovieNamePermutations(Collection<String> terms) throws IOException {
|
public static List<String> reduceMovieNamePermutations(Collection<String> terms) throws IOException {
|
||||||
LinkedList<String> names = new LinkedList<String>();
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
|
|
||||||
for (String it : terms) {
|
for (String it : terms) {
|
||||||
|
|
Loading…
Reference in New Issue