Rename GetFFmpegVersion to GetVersion in FFmpegContract for consistency and clarity.

This commit is contained in:
Leonid Nikitin 2025-06-09 23:21:19 +05:00
parent c8619cdc7f
commit a9c59137af
Signed by: kor-elf
GPG Key ID: DAB5355A11C22541
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ type ProgressContract interface {
type FFmpegContract interface { type FFmpegContract interface {
GetPath() string GetPath() string
GetFFmpegVersion() (string, error) GetVersion() (string, error)
GetEncoders(scanner func(scanner *bufio.Reader)) error GetEncoders(scanner func(scanner *bufio.Reader)) error
RunConvert(setting ConvertSetting, progress ProgressContract, beforeWait func(cmd *exec.Cmd), afterWait func(cmd *exec.Cmd)) error RunConvert(setting ConvertSetting, progress ProgressContract, beforeWait func(cmd *exec.Cmd), afterWait func(cmd *exec.Cmd)) error
} }
@ -49,7 +49,7 @@ func (f *ffmpeg) GetPath() string {
return f.path return f.path
} }
func (f *ffmpeg) GetFFmpegVersion() (string, error) { func (f *ffmpeg) GetVersion() (string, error) {
cmd := exec.Command(f.path, "-version") cmd := exec.Command(f.path, "-version")
utils.PrepareBackgroundCommand(cmd) utils.PrepareBackgroundCommand(cmd)
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()

View File

@ -89,7 +89,7 @@ func (u *utilities) GetFFmpegVersion() string {
return lang.L("errorFFmpegVersion") return lang.L("errorFFmpegVersion")
} }
version, err := ffmpegService.GetFFmpegVersion() version, err := ffmpegService.GetVersion()
if err != nil { if err != nil {
return lang.L("errorFFmpegVersion") return lang.L("errorFFmpegVersion")
} }