VideoTools/internal/modules/handlers.go
Stu 18a14c6020 Refactor to modular architecture with rainbow UI (v0.1.0-dev8)
Major refactoring to improve code organization and enhance UI:

Architecture:
- Split monolithic main.go into modular internal/ package structure
- Created internal/logging for centralized logging system
- Created internal/modules for module handler functions
- Created internal/ui for UI components and layouts
- Created internal/utils for shared utility functions

UI Enhancements:
- Implemented rainbow gradient across 8 module buttons (violet→red)
- Increased module button text size to 20 for better readability
- Fixed text centering on module tiles
- Converted Simple/Advanced mode toggle to tabs to save vertical space
- Added vertical scrollbars to prevent UI overflow
- Added metadata copy button (📋) to copy all metadata to clipboard

Video Processing:
- Fixed aspect ratio conversion to default to center-crop behavior
- Added 6 aspect handling modes: Auto, Crop, Letterbox, Pillarbox, Blur Fill, Stretch
- Fixed blur fill to maintain source resolution with padding (no scaling)
- Ensured all FFmpeg filters produce even-numbered dimensions for H.264

Known Issues:
- WMV files still produce FFmpeg error 234 during aspect conversions
  (requires codec-specific handling in future update)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 14:56:37 -05:00

58 lines
1.6 KiB
Go

package modules
import (
"fmt"
"git.leaktechnologies.dev/stu/VideoTools/internal/logging"
)
// Module handlers - each handles the logic for a specific module
// HandleConvert handles the convert module
func HandleConvert(files []string) {
logging.Debug(logging.CatFFMPEG, "convert handler invoked with %v", files)
fmt.Println("convert", files)
}
// HandleMerge handles the merge module
func HandleMerge(files []string) {
logging.Debug(logging.CatFFMPEG, "merge handler invoked with %v", files)
fmt.Println("merge", files)
}
// HandleTrim handles the trim module
func HandleTrim(files []string) {
logging.Debug(logging.CatModule, "trim handler invoked with %v", files)
fmt.Println("trim", files)
}
// HandleFilters handles the filters module
func HandleFilters(files []string) {
logging.Debug(logging.CatModule, "filters handler invoked with %v", files)
fmt.Println("filters", files)
}
// HandleUpscale handles the upscale module
func HandleUpscale(files []string) {
logging.Debug(logging.CatModule, "upscale handler invoked with %v", files)
fmt.Println("upscale", files)
}
// HandleAudio handles the audio module
func HandleAudio(files []string) {
logging.Debug(logging.CatModule, "audio handler invoked with %v", files)
fmt.Println("audio", files)
}
// HandleThumb handles the thumb module
func HandleThumb(files []string) {
logging.Debug(logging.CatModule, "thumb handler invoked with %v", files)
fmt.Println("thumb", files)
}
// HandleInspect handles the inspect module
func HandleInspect(files []string) {
logging.Debug(logging.CatModule, "inspect handler invoked with %v", files)
fmt.Println("inspect", files)
}