Add directory selection for saving converted files

Introduce logic and UI for selecting and persisting a directory to save converted files. Extend existing components with directory selection buttons, message updates, and storage preferences.
This commit is contained in:
2025-06-08 00:18:56 +05:00
parent 394824ce88
commit 6c0abac1c5
4 changed files with 123 additions and 4 deletions

View File

@@ -7,7 +7,12 @@ import (
)
func (c *controller) convertor() {
content := view.Convertor(c.window, c.addFileForConversion)
content := view.Convertor(
c.window,
c.addFileForConversion,
c.app.GetSetting().GetDirectoryForSaving(),
c.setDirectoryForSaving,
)
c.window.SetContent(content)
}
@@ -16,6 +21,10 @@ func (c *controller) addFileForConversion(file ffmpeg.File) {
c.window.GetLayout().GetRContainer().SelectAddedFilesTab()
}
func (c *controller) setDirectoryForSaving(path string) {
c.app.GetSetting().SetDirectoryForSaving(path)
}
func (c *controller) settingConvertor(isAllowCancellation bool) {
ffmpegPath := c.app.GetFFmpegService().GetFFmpegPath()
ffprobePath := c.app.GetFFmpegService().GetFFprobePath()