wrap some encode errors
This commit is contained in:
@@ -116,11 +116,14 @@ func (c *Controller) ServeStream(w http.ResponseWriter, r *http.Request) *spec.R
|
||||
if fileExists(cacheFile) {
|
||||
log.Printf("cache [%s/%s] hit!\n", profile.Format, bitrate)
|
||||
http.ServeFile(w, r, cacheFile)
|
||||
return
|
||||
return nil
|
||||
}
|
||||
log.Printf("cache [%s/%s] miss!\n", profile.Format, bitrate)
|
||||
if err := encode.Encode(w, absPath, cacheFile, profile, bitrate); err != nil {
|
||||
log.Printf("cache [%s/%s] miss!\n", profile.Format, bitrate)
|
||||
log.Printf("error encoding %q: %v\n", absPath, err)
|
||||
}
|
||||
log.Printf("track `%s` encoded to [%s/%s] successfully\n",
|
||||
track.Filename, profile.Format, profile.Bitrate)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user