Add batch settings management UI for multi-video conversions

Implements clear batch settings control for converting multiple videos:

Features:
- Settings persistence: All conversion settings automatically persist across videos
- Clear UI messaging: Explains that settings carry over between videos
- Reset button: One-click ability to reset all settings to defaults
- Batch workflow: Load video → set format/quality once → convert multiple videos

How it works:
1. User loads first video and configures settings (format, quality, codecs, etc)
2. Settings are stored in state.convert and persist across video loads
3. User can load additional videos - settings remain the same
4. When converting multiple videos, all use the same settings
5. User can change settings anytime - affects all subsequent videos
6. Reset button available to restore defaults if needed

This eliminates the need to reconfigure every video while allowing:
- Batch processing with same settings
- Individual video settings override when needed
- Clear visual indication of what's happening

Perfect for the user's workflow of converting 5 European videos to
DVD-NTSC format - set once, convert all 5!
This commit is contained in:
Stu Leak 2025-11-29 20:30:39 -05:00
parent eab41057aa
commit f306cf32e6

49
main.go
View File

@ -1535,6 +1535,47 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
state.convert.AspectHandling = value
}
// Settings management for batch operations
settingsInfoLabel := widget.NewLabel("Settings persist across videos. Change them anytime to affect all subsequent videos.")
settingsInfoLabel.Wrapping = fyne.TextWrapWord
resetSettingsBtn := widget.NewButton("Reset to Defaults", func() {
// Reset to default settings
state.convert = convertConfig{
SelectedFormat: formatOptions[0],
OutputBase: "converted",
Quality: "Standard (CRF 23)",
InverseTelecine: false,
OutputAspect: "Source",
AspectHandling: "Auto",
VideoCodec: "H.264",
EncoderPreset: "medium",
BitrateMode: "CRF",
CRF: "",
VideoBitrate: "",
TargetResolution: "Source",
FrameRate: "Source",
PixelFormat: "yuv420p",
HardwareAccel: "none",
AudioCodec: "AAC",
AudioBitrate: "192k",
AudioChannels: "Source",
}
logging.Debug(logging.CatUI, "settings reset to defaults")
// Refresh all UI elements to show new settings
formatSelect.SetSelected(state.convert.SelectedFormat.Label)
qualitySelect.SetSelected(state.convert.Quality)
outputEntry.SetText(state.convert.OutputBase)
})
resetSettingsBtn.Importance = widget.LowImportance
settingsBox := container.NewVBox(
widget.NewLabelWithStyle("═══ BATCH SETTINGS ═══", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
settingsInfoLabel,
resetSettingsBtn,
widget.NewSeparator(),
)
// Simple mode options - minimal controls, aspect locked to Source
simpleOptions := container.NewVBox(
widget.NewLabelWithStyle("═══ OUTPUT ═══", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
@ -1733,8 +1774,14 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
)
// Create tabs for Simple/Advanced modes
// Wrap simple options with settings box at top
simpleWithSettings := container.NewVBox(
settingsBox,
simpleOptions,
)
tabs := container.NewAppTabs(
container.NewTabItem("Simple", container.NewVScroll(simpleOptions)),
container.NewTabItem("Simple", container.NewVScroll(simpleWithSettings)),
container.NewTabItem("Advanced", container.NewVScroll(advancedOptions)),
)
tabs.SetTabLocation(container.TabLocationTop)