Refactor search functionality in Lora and Recipe scanners to utilize fuzzy matching

- Introduced a new fuzzy_match utility function for improved search accuracy across Lora and Recipe scanners.
- Updated search logic in LoraScanner and RecipeScanner to leverage fuzzy matching for titles, tags, and filenames, enhancing user experience.
- Removed deprecated search methods to streamline the codebase and improve maintainability.
- Adjusted API routes to ensure compatibility with the new search options, including recursive search handling.
This commit is contained in:
Will Miao
2025-03-20 16:55:51 +08:00
parent 19ff2ebfe1
commit 607ab35cce
7 changed files with 98 additions and 106 deletions

View File

@@ -131,8 +131,8 @@ class RecipeManager {
// Update recipes grid
this.updateRecipesGrid(data, resetPage);
// Update pagination state
this.pageState.hasMore = data.has_more || false;
// Update pagination state based on current page and total pages
this.pageState.hasMore = data.page < data.total_pages;
} catch (error) {
console.error('Error loading recipes:', error);