From a9c59137af15bc5135a07ef9d3e766dc48a46596 Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Mon, 9 Jun 2025 23:21:19 +0500 Subject: [PATCH] Rename `GetFFmpegVersion` to `GetVersion` in `FFmpegContract` for consistency and clarity. --- internal/ffmpeg/ffmpeg.go | 4 ++-- internal/ffmpeg/utilities.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/ffmpeg/ffmpeg.go b/internal/ffmpeg/ffmpeg.go index 515e180..e4046d1 100644 --- a/internal/ffmpeg/ffmpeg.go +++ b/internal/ffmpeg/ffmpeg.go @@ -18,7 +18,7 @@ type ProgressContract interface { type FFmpegContract interface { GetPath() string - GetFFmpegVersion() (string, error) + GetVersion() (string, error) GetEncoders(scanner func(scanner *bufio.Reader)) 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 } -func (f *ffmpeg) GetFFmpegVersion() (string, error) { +func (f *ffmpeg) GetVersion() (string, error) { cmd := exec.Command(f.path, "-version") utils.PrepareBackgroundCommand(cmd) out, err := cmd.CombinedOutput() diff --git a/internal/ffmpeg/utilities.go b/internal/ffmpeg/utilities.go index 61b680b..b0802b7 100644 --- a/internal/ffmpeg/utilities.go +++ b/internal/ffmpeg/utilities.go @@ -89,7 +89,7 @@ func (u *utilities) GetFFmpegVersion() string { return lang.L("errorFFmpegVersion") } - version, err := ffmpegService.GetFFmpegVersion() + version, err := ffmpegService.GetVersion() if err != nil { return lang.L("errorFFmpegVersion") }