Got browse caching working

This commit is contained in:
Sumner Evans
2020-05-14 22:49:30 -06:00
parent 8f07d1ec48
commit 8017aac704
24 changed files with 900 additions and 388 deletions

View File

@@ -7,6 +7,7 @@ from sublime.adapters import AlbumSearchQuery
def params_hash(*params: Any) -> str:
# Special handling for AlbumSearchQuery objects.
# TODO figure out if I can optimize this
if len(params) > 0 and isinstance(params[0], AlbumSearchQuery):
params = (hash(params[0]), *params[1:])
return hashlib.sha1(bytes(json.dumps(params), "utf8")).hexdigest()