|
|
|
@ -12,6 +12,7 @@ from videohash.exceptions import FFmpegFailedToExtractFrames |
|
|
|
|
hashes = set() |
|
|
|
|
audio_hashes = [] |
|
|
|
|
delete = set() |
|
|
|
|
hash_lookup = {} |
|
|
|
|
|
|
|
|
|
filenames = [x for x in glob.glob('**', recursive=True) if os.path.isfile(x)] |
|
|
|
|
|
|
|
|
@ -88,10 +89,14 @@ for filename in filenames: |
|
|
|
|
|
|
|
|
|
if not digest: continue |
|
|
|
|
|
|
|
|
|
hash_lookup[digest] = filename |
|
|
|
|
|
|
|
|
|
if type(digest) == int: |
|
|
|
|
for h in audio_hashes: |
|
|
|
|
if bin(digest ^ h).count('1') <= 5: # TODO adjust? |
|
|
|
|
delete.add(filename) |
|
|
|
|
print() |
|
|
|
|
print(digest, filename, 'close to', h, hash_lookup[h]) |
|
|
|
|
break |
|
|
|
|
else: # for |
|
|
|
|
audio_hashes.append(digest) |
|
|
|
|