fix: potential bug after adding excluded directories (#94)

* Revert "fix: missing parameter (#93)"

This reverts commit c2406a1fd1.

* Revert "feat: add exclude scan model types (#92)"

This reverts commit 40a1a7f43a.

* feat: add exclude scan model types

* fix: potential bug after adding excluded directories
This commit is contained in:
Hayden
2025-01-14 11:04:41 +08:00
committed by GitHub
parent c2406a1fd1
commit be383ac6e1
9 changed files with 59 additions and 30 deletions

View File

@@ -69,7 +69,7 @@ def get_model_info(model_path: str):
}
def update_model(model_path: str, model_data: dict, request):
def update_model(model_path: str, model_data: dict):
if "previewFile" in model_data:
previewFile = model_data["previewFile"]
@@ -87,7 +87,7 @@ def update_model(model_path: str, model_data: dict, request):
raise RuntimeError("Invalid type or pathIndex or fullname")
# get new path
new_model_path = utils.get_full_path(model_type, path_index, fullname, request)
new_model_path = utils.get_full_path(model_type, path_index, fullname)
utils.rename_model(model_path, new_model_path)
@@ -136,7 +136,7 @@ def fetch_model_info(model_page: str):
async def download_model_info(scan_mode: str, request):
utils.print_info(f"Download model info for {scan_mode}")
model_base_paths = utils.resolve_model_base_paths(request)
model_base_paths = utils.resolve_model_base_paths()
for model_type in model_base_paths:
folders, extensions = folder_paths.folder_names_and_paths[model_type]