IDK
This commit is contained in:
parent
230460c153
commit
c226c3807a
5
main.py
5
main.py
|
@ -12,6 +12,7 @@ from videohash.exceptions import FFmpegFailedToExtractFrames
|
||||||
hashes = set()
|
hashes = set()
|
||||||
audio_hashes = []
|
audio_hashes = []
|
||||||
delete = set()
|
delete = set()
|
||||||
|
hash_lookup = {}
|
||||||
|
|
||||||
filenames = [x for x in glob.glob('**', recursive=True) if os.path.isfile(x)]
|
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
|
if not digest: continue
|
||||||
|
|
||||||
|
hash_lookup[digest] = filename
|
||||||
|
|
||||||
if type(digest) == int:
|
if type(digest) == int:
|
||||||
for h in audio_hashes:
|
for h in audio_hashes:
|
||||||
if bin(digest ^ h).count('1') <= 5: # TODO adjust?
|
if bin(digest ^ h).count('1') <= 5: # TODO adjust?
|
||||||
delete.add(filename)
|
delete.add(filename)
|
||||||
|
print()
|
||||||
|
print(digest, filename, 'close to', h, hash_lookup[h])
|
||||||
break
|
break
|
||||||
else: # for
|
else: # for
|
||||||
audio_hashes.append(digest)
|
audio_hashes.append(digest)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user