refactor: Remove move_model method from LoraScanner class to streamline code

This commit is contained in:
Will Miao
2025-04-11 06:05:19 +08:00
parent 18aa8d11ad
commit 86810d9f03
2 changed files with 2 additions and 61 deletions

View File

@@ -482,7 +482,8 @@ class ModelScanner:
def get_hash_by_path(self, file_path: str) -> Optional[str]:
"""Get hash for a model by its file path"""
return self._hash_index.get_hash(file_path)
# TODO: Adjust this method to use metadata instead of finding the file
def get_preview_url_by_hash(self, sha256: str) -> Optional[str]:
"""Get preview static URL for a model by its hash"""
file_path = self._hash_index.get_path(sha256.lower())