diff --git a/dejavu/__init__.py b/dejavu/__init__.py index fac72bc5..06e98fd9 100755 --- a/dejavu/__init__.py +++ b/dejavu/__init__.py @@ -194,13 +194,13 @@ def align_matches(self, matches: List[Tuple[int, int]], dedup_hashes: Dict[str, ) songs_result = [] - for song_id, offset, _ in songs_matches[0:topn]: # consider topn elements in the result + for song_id, offset, matching_count in songs_matches[0:topn]: # consider topn elements in the result song = self.db.get_song_by_id(song_id) song_name = song.get(SONG_NAME, None) song_hashes = song.get(FIELD_TOTAL_HASHES, None) nseconds = round(float(offset) / DEFAULT_FS * DEFAULT_WINDOW_SIZE * DEFAULT_OVERLAP_RATIO, 5) - hashes_matched = dedup_hashes[song_id] + hashes_matched = matching_count song = { SONG_ID: song_id,