Leonid Nikitin c60b9f7b0c
Add FFmpeg utilities configuration UI and automated downloading
Introduce a new UI for configuring FFmpeg, FFprobe, and FFplay paths with file selection and error handling. Add platform-specific logic for downloading and extracting FFmpeg binaries directly within the application, improving user experience.
2025-06-07 01:30:32 +05:00

41 lines
792 B
Go

package setting
func (s *setting) GetFFmpegPath() string {
path := s.fyneApp.Preferences().String("ffmpegPath")
if path == "" {
return "ffmpeg"
}
return path
}
func (s *setting) SetFFmpegPath(path string) {
s.fyneApp.Preferences().SetString("ffmpegPath", path)
}
func (s *setting) GetFFprobePath() string {
path := s.fyneApp.Preferences().String("ffprobePath")
if path == "" {
return "ffprobe"
}
return path
}
func (s *setting) SetFFprobePath(path string) {
s.fyneApp.Preferences().SetString("ffprobePath", path)
}
func (s *setting) GetFFplayPath() string {
path := s.fyneApp.Preferences().String("ffplayPath")
if path == "" {
return "ffplay"
}
return path
}
func (s *setting) SetFFplayPath(path string) {
s.fyneApp.Preferences().SetString("ffplayPath", path)
}