Fix slow scan on Windows

This commit is contained in:
Stash Dev
2019-02-09 17:28:22 -08:00
parent c39d4d4d40
commit a0c73e8004

View File

@@ -46,7 +46,8 @@ func NewFFProbe(ffprobePath string) ffprobeExecutable {
// Execute exec command and bind result to struct. // Execute exec command and bind result to struct.
func (ffp *ffprobeExecutable) ProbeVideo(filePath string) (*FFProbeResult, error) { func (ffp *ffprobeExecutable) ProbeVideo(filePath string) (*FFProbeResult, error) {
args := []string{"-v", "quiet", "-print_format", "json", "-show_format", "-show_streams", "-show_error", filePath} args := []string{"-v", "quiet", "-print_format", "json", "-show_format", "-show_streams", "-show_error", filePath}
if runtime.GOOS == "windows" { // Extremely slow on windows for some reason
if runtime.GOOS != "windows" {
args = append(args, "-count_frames") args = append(args, "-count_frames")
} }
out, err := exec.Command(ffp.Path, args...).Output() out, err := exec.Command(ffp.Path, args...).Output()