Add GetFFplayVersion
method to retrieve FFplay version details
Extended `FFplayContract` with `GetVersion` to fetch FFplay version. Implemented version extraction in `utilities` and `ffplay` to support version retrieval functionality.
This commit is contained in:
@@ -34,6 +34,7 @@ type UtilitiesContract interface {
|
||||
ChangeFFprobe(path string) error
|
||||
|
||||
GetFFplay() (FFplayContract, error)
|
||||
GetFFplayVersion() string
|
||||
GetFFplayPath() string
|
||||
ChangeFFplay(path string) error
|
||||
}
|
||||
@@ -182,6 +183,19 @@ func (u *utilities) GetFFplay() (FFplayContract, error) {
|
||||
return u.ffplay, nil
|
||||
}
|
||||
|
||||
func (u *utilities) GetFFplayVersion() string {
|
||||
ffplayService, err := u.GetFFplay()
|
||||
if err != nil {
|
||||
return lang.L("errorFFplayVersion")
|
||||
}
|
||||
|
||||
ffplayVersion, err := ffplayService.GetVersion()
|
||||
if err != nil {
|
||||
return lang.L("errorFFplayVersion")
|
||||
}
|
||||
return ffplayVersion
|
||||
}
|
||||
|
||||
func (u *utilities) GetFFplayPath() string {
|
||||
ffplayService, err := u.GetFFplay()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user