From e1454bf1ea0ee661fef8ac0575439e224bc26e0b Mon Sep 17 00:00:00 2001 From: worldveil Date: Wed, 5 Mar 2014 01:30:19 -0500 Subject: [PATCH] Incorporated MAX_HASH_TIME_DELTA optimization --- dejavu/fingerprint.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dejavu/fingerprint.py b/dejavu/fingerprint.py index e9d72f2..45ee59c 100755 --- a/dejavu/fingerprint.py +++ b/dejavu/fingerprint.py @@ -110,8 +110,7 @@ def generate_hashes(peaks, fan_value=DEFAULT_FAN_VALUE): if t_delta >= MIN_HASH_TIME_DELTA and t_delta <= MAX_HASH_TIME_DELTA: h = hashlib.sha1( - "%s|%s|%s" % (str(freq1), str(freq2), str(t_delta)) - ) + "%s|%s|%s" % (str(freq1), str(freq2), str(t_delta))) yield (h.hexdigest()[0:20], t1) # ensure we don't repeat hashing