Add GetFFprobeVersion
method to retrieve FFprobe version details
Extended `FFprobeContract` with `GetVersion` to fetch FFprobe version. Implemented version extraction in `utilities` and `ffprobe` to support version retrieval functionality.
This commit is contained in:
@@ -29,6 +29,7 @@ type UtilitiesContract interface {
|
||||
ChangeFFmpeg(path string) error
|
||||
|
||||
GetFFprobe() (FFprobeContract, error)
|
||||
GetFFprobeVersion() string
|
||||
GetFFprobePath() string
|
||||
ChangeFFprobe(path string) error
|
||||
|
||||
@@ -132,6 +133,19 @@ func (u *utilities) GetFFprobe() (FFprobeContract, error) {
|
||||
return u.ffprobe, nil
|
||||
}
|
||||
|
||||
func (u *utilities) GetFFprobeVersion() string {
|
||||
ffprobeService, err := u.GetFFprobe()
|
||||
if err != nil {
|
||||
return lang.L("errorFFprobeVersion")
|
||||
}
|
||||
|
||||
ffprobeVersion, err := ffprobeService.GetVersion()
|
||||
if err != nil {
|
||||
return lang.L("errorFFprobeVersion")
|
||||
}
|
||||
return ffprobeVersion
|
||||
}
|
||||
|
||||
func (u *utilities) GetFFprobePath() string {
|
||||
ffprobeService, err := u.GetFFprobe()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user