feat(model-scanner): add metadata tracking and improve cache management

- Add metadata_source field to track origin of model metadata
- Define MODEL_COLUMNS constants for consistent column management
- Refactor SQL queries to use dynamic column selection
- Improve Civitai data detection to include creator_username and trained_words
- Update database operations to handle new metadata field and tag management
This commit is contained in:
Will Miao
2025-10-12 16:54:39 +08:00
parent a9a6f66035
commit acf610ddff
3 changed files with 372 additions and 32 deletions

View File

@@ -189,6 +189,7 @@ class ModelScanner:
'favorite': bool(get_value('favorite', False)),
'notes': notes,
'usage_tips': usage_tips,
'metadata_source': get_value('metadata_source', None),
'exclude': bool(get_value('exclude', False)),
'db_checked': bool(get_value('db_checked', False)),
'last_checked_at': float(get_value('last_checked_at', 0.0) or 0.0),