1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

* specifically track positive hash lookups

This commit is contained in:
Reinhard Pointner 2011-11-08 04:35:56 +00:00
parent 310d2fc6a6
commit fd47405f0c

View File

@ -2,6 +2,8 @@
package net.sourceforge.filebot.ui.rename; package net.sourceforge.filebot.ui.rename;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static javax.swing.JOptionPane.*; import static javax.swing.JOptionPane.*;
import static net.sourceforge.filebot.MediaTypes.*; import static net.sourceforge.filebot.MediaTypes.*;
import static net.sourceforge.tuned.FileUtilities.*; import static net.sourceforge.tuned.FileUtilities.*;
@ -55,6 +57,7 @@ class MovieHashMatcher implements AutoCompleteMatcher {
// match movie hashes online // match movie hashes online
Movie[] movieByFileHash = service.getMovieDescriptors(movieFiles, locale); Movie[] movieByFileHash = service.getMovieDescriptors(movieFiles, locale);
Analytics.trackEvent(service.getName(), "HashLookup", "Movie", movieByFileHash.length - frequency(asList(movieByFileHash), null)); // number of positive hash lookups
// map movies to (possibly multiple) files (in natural order) // map movies to (possibly multiple) files (in natural order)
Map<Movie, SortedSet<File>> filesByMovie = new HashMap<Movie, SortedSet<File>>(); Map<Movie, SortedSet<File>> filesByMovie = new HashMap<Movie, SortedSet<File>>();
@ -86,8 +89,6 @@ class MovieHashMatcher implements AutoCompleteMatcher {
} }
} }
Analytics.trackEvent(service.getName(), "HashLookup", "Movie", filesByMovie.size()); // number of positive hash lookups
// collect all File/MoviePart matches // collect all File/MoviePart matches
List<Match<File, ?>> matches = new ArrayList<Match<File, ?>>(); List<Match<File, ?>> matches = new ArrayList<Match<File, ?>>();