Removed some more use of debug

This commit is contained in:
Unknown 2018-01-23 15:27:15 +10:30
parent eb3f6a82d9
commit 3d46b750e7
1 changed files with 2 additions and 4 deletions

View File

@ -325,16 +325,14 @@ func (r *revidInst)sendClipToHTTP(clip []byte, output string) error {
Timeout: timeout,
}
url := output + strconv.Itoa(len(clip))
if r.config.Debug {
fmt.Printf("Posting %s (%d bytes)\n", url, len(clip))
}
fmt.Printf("Posting %s (%d bytes)\n", url, len(clip))
resp, err := client.Post(url, "video/mp2t", bytes.NewReader(clip)) // lighter than NewBuffer
if err != nil {
return fmt.Errorf("Error posting to %s: %s", output, err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err == nil && r.config.Debug {
if err == nil {
fmt.Printf("%s\n", body)
}
return nil