From e6331f1116f73f5f626ba9b82f698282b8a95333 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 23 Dec 2013 05:33:24 +0000 Subject: [PATCH] * revert folder-by-folder change because movies my very well be sorted into different CDn folders --- .../filebot/ui/rename/MovieHashMatcher.java | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/source/net/sourceforge/filebot/ui/rename/MovieHashMatcher.java b/source/net/sourceforge/filebot/ui/rename/MovieHashMatcher.java index a78bb3f6..84f0ebd6 100644 --- a/source/net/sourceforge/filebot/ui/rename/MovieHashMatcher.java +++ b/source/net/sourceforge/filebot/ui/rename/MovieHashMatcher.java @@ -222,23 +222,21 @@ class MovieHashMatcher implements AutoCompleteMatcher { List> matches = new ArrayList>(); for (Entry> byMovie : filesByMovie.entrySet()) { - for (List byFolder : mapByFolder(byMovie.getValue()).values()) { - for (List fileSet : mapByExtension(byFolder).values()) { - // resolve movie parts - for (int i = 0; i < fileSet.size(); i++) { - Movie moviePart = byMovie.getKey(); - if (fileSet.size() > 1) { - moviePart = new MoviePart(moviePart, i + 1, fileSet.size()); - } + for (List fileSet : mapByExtension(byMovie.getValue()).values()) { + // resolve movie parts + for (int i = 0; i < fileSet.size(); i++) { + Movie moviePart = byMovie.getKey(); + if (fileSet.size() > 1) { + moviePart = new MoviePart(moviePart, i + 1, fileSet.size()); + } - matches.add(new Match(fileSet.get(i), moviePart.clone())); + matches.add(new Match(fileSet.get(i), moviePart.clone())); - // automatically add matches for derived files - List derivates = derivatesByMovieFile.get(fileSet.get(i)); - if (derivates != null) { - for (File derivate : derivates) { - matches.add(new Match(derivate, moviePart.clone())); - } + // automatically add matches for derived files + List derivates = derivatesByMovieFile.get(fileSet.get(i)); + if (derivates != null) { + for (File derivate : derivates) { + matches.add(new Match(derivate, moviePart.clone())); } } }