Revert "Improve ffmpeg's error diagnostic"
This reverts commit 4fc88f23
This commit is contained in:
@@ -3,7 +3,6 @@ package scanner
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"mime"
|
"mime"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
@@ -75,17 +74,14 @@ func LoadAllAudioFiles(dirPath string) (map[string]os.FileInfo, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ExtractAllMetadata(inputs []string) (map[string]*Metadata, error) {
|
func ExtractAllMetadata(inputs []string) (map[string]*Metadata, error) {
|
||||||
mds := map[string]*Metadata{}
|
|
||||||
cmdLine, args := createProbeCommand(inputs)
|
cmdLine, args := createProbeCommand(inputs)
|
||||||
|
|
||||||
log.Trace("Executing command", "arg0", cmdLine, "args", args)
|
log.Trace("Executing command", "arg0", cmdLine, "args", args)
|
||||||
cmd := exec.Command(cmdLine, args...)
|
cmd := exec.Command(cmdLine, args...)
|
||||||
output, err := cmd.CombinedOutput()
|
output, _ := cmd.CombinedOutput()
|
||||||
if err != nil {
|
mds := map[string]*Metadata{}
|
||||||
return mds, fmt.Errorf("error extracting metadata files: %s", err)
|
|
||||||
}
|
|
||||||
if len(output) == 0 {
|
if len(output) == 0 {
|
||||||
return mds, errors.New("error extracting metadata files: no output")
|
return mds, errors.New("error extracting metadata files")
|
||||||
}
|
}
|
||||||
infos := parseOutput(string(output))
|
infos := parseOutput(string(output))
|
||||||
for file, info := range infos {
|
for file, info := range infos {
|
||||||
|
|||||||
Reference in New Issue
Block a user