Update song_hash.py

This commit is contained in:
Yonokid
2025-07-29 12:49:30 -04:00
parent 69e718fa49
commit b99a6510db

View File

@@ -24,6 +24,8 @@ class DiffHashesDecoder(json.JSONDecoder):
super().__init__(object_hook=diff_hashes_object_hook, *args, **kwargs)
def build_song_hashes(output_dir=Path("cache")):
if not output_dir.exists():
output_dir.mkdir()
song_hashes: dict[str, list[dict]] = dict()
path_to_hash: dict[str, str] = dict() # New index for O(1) path lookups