1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00

* revert folder-by-folder change because movies my very well be sorted into different CDn folders

This commit is contained in:
Reinhard Pointner 2013-12-23 05:33:24 +00:00
parent 56d1892e24
commit e6331f1116

View File

@ -222,23 +222,21 @@ class MovieHashMatcher implements AutoCompleteMatcher {
List<Match<File, ?>> matches = new ArrayList<Match<File, ?>>(); List<Match<File, ?>> matches = new ArrayList<Match<File, ?>>();
for (Entry<Movie, SortedSet<File>> byMovie : filesByMovie.entrySet()) { for (Entry<Movie, SortedSet<File>> byMovie : filesByMovie.entrySet()) {
for (List<File> byFolder : mapByFolder(byMovie.getValue()).values()) { for (List<File> fileSet : mapByExtension(byMovie.getValue()).values()) {
for (List<File> fileSet : mapByExtension(byFolder).values()) { // resolve movie parts
// resolve movie parts for (int i = 0; i < fileSet.size(); i++) {
for (int i = 0; i < fileSet.size(); i++) { Movie moviePart = byMovie.getKey();
Movie moviePart = byMovie.getKey(); if (fileSet.size() > 1) {
if (fileSet.size() > 1) { moviePart = new MoviePart(moviePart, i + 1, fileSet.size());
moviePart = new MoviePart(moviePart, i + 1, fileSet.size()); }
}
matches.add(new Match<File, Movie>(fileSet.get(i), moviePart.clone())); matches.add(new Match<File, Movie>(fileSet.get(i), moviePart.clone()));
// automatically add matches for derived files // automatically add matches for derived files
List<File> derivates = derivatesByMovieFile.get(fileSet.get(i)); List<File> derivates = derivatesByMovieFile.get(fileSet.get(i));
if (derivates != null) { if (derivates != null) {
for (File derivate : derivates) { for (File derivate : derivates) {
matches.add(new Match<File, Movie>(derivate, moviePart.clone())); matches.add(new Match<File, Movie>(derivate, moviePart.clone()));
}
} }
} }
} }