Skip to content

Commit

Permalink
Merge pull request #69 from AIGODLIKE/develop
Browse files Browse the repository at this point in the history
-
  • Loading branch information
KarryCharon authored Jan 2, 2025
2 parents b2b3072 + 6c6b30f commit 43839ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def find_model(mtype, model_name) -> Path:

class ThumbnailManager:
_code_map = {}
_path_code_map = {}
_image_map = {}
_image_time = {}

Expand All @@ -221,7 +222,8 @@ def add_code(cls, path: str):
if path not in cls._image_map:
code = md5(path.encode()).hexdigest()
cls._code_map[code] = path
return cls._code_map.get(code, "")
cls._path_code_map[path] = code
return cls._path_code_map.get(path, "")

@classmethod
def get_path(cls, code: str) -> str:
Expand Down

0 comments on commit 43839ce

Please sign in to comment.