Backend optimizations:
- Refactor get_random_images() using SQLite ORDER BY RANDOM()
- Simplify from 60+ lines to ~20 lines with better performance
- Remove complex multi-cycle index calculations
- Maintain file existence check and auto-cleanup
ComfyUI support:
- Add fallback to 'parameters' field in PNG metadata
- Improve detection for ComfyUI-generated images
Frontend improvements:
- Smart prompt display: auto-detect tag vs natural language format
- Add getTextLength() with Chinese character weight (1 char = 3 letters)
- Refactor isTagStylePrompt() with clear rules:
* Any tag length > 50 natural language format
* Average tag length > 30 natural language format
- Natural language prompts shown as paragraphs
- Tag-style prompts shown as badges
- Better support for Chinese/English mixed content
Build:
- Update frontend asset references
- Add AutoTagMatcher singleton class for automatic tag application
- Support filtering by multiple fields (prompt, model, sampler, etc.)
- Add frontend UI for managing auto-tag rules in global settings
- Support AND logic for multiple conditions within a rule
- Integrate with image indexing process
- Add natural language vs tag-style prompt detection and rendering
- Include rule descriptions and usage guidance in UI
- Auto-reload rules when updated via API
- Add toggle for navigation buttons in global settings
- Add multi-language support for new settings (en, zh-hans, zh-hant, de)
- Improve video display in TikTok view using fit-content
- Added video tag support for enhanced media file handling:
* Video files can now use tag-based search functionality
* Added support for reading video generation info from txt files
* Enhanced EXIF data handling for video media types
- Implemented random sort feature for image grid:
* Added random sort toggle button with visual indicators (🎲/📅)
* Supports both random and date-based sorting modes
* Optimized pagination for random sorting with offset-based cursors
- Complete internationalization support:
* Added translations for random sort and date sort in all languages
* Supported languages: zh-hans, en, de, zh-hant
* Improved UI consistency across language variants
- Backend improvements:
* Enhanced database queries to support random sorting
* Added random_sort parameter to API endpoints
* Improved error handling for video file processing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>