feat(example-images): add check pending models endpoint and improve async handling

- Add /api/example-images/check-pending endpoint to quickly check models needing downloads
- Improve DownloadManager.start_download() to return immediately without blocking
- Add _handle_download_task_done callback for proper error handling and progress saving
- Add check_pending_models() method for lightweight pre-download validation
- Update frontend ExampleImagesManager to use new check-pending endpoint
- Add comprehensive tests for new functionality
This commit is contained in:
Will Miao
2026-02-02 12:31:07 +08:00
parent 1daaff6bd4
commit 1da476d858
7 changed files with 734 additions and 17 deletions

View File

@@ -502,6 +502,7 @@ def test_handler_set_route_mapping_includes_all_handlers() -> None:
"resume_example_images",
"stop_example_images",
"force_download_example_images",
"check_example_images_needed",
"import_example_images",
"delete_example_image",
"set_example_image_nsfw_level",