Change ffmpeg handling (#4688)

* Make ffmpeg/ffprobe settable and remove auto download
* Detect when ffmpeg not present in setup
* Add download ffmpeg task
* Add download ffmpeg button in system settings
* Download ffmpeg during setup
This commit is contained in:
WithoutPants
2024-03-21 12:43:40 +11:00
committed by GitHub
parent a369613d42
commit 7086109d78
22 changed files with 694 additions and 297 deletions

View File

@@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"regexp"
"runtime"
"strings"
"github.com/stashapp/stash/pkg/logger"
@@ -163,3 +164,12 @@ func SanitiseBasename(v string) string {
return strings.TrimSpace(v)
}
// GetExeName returns the name of the given executable for the current platform.
// One windows it returns the name with the .exe extension.
func GetExeName(base string) string {
if runtime.GOOS == "windows" {
return base + ".exe"
}
return base
}