Fix subtitle error typo (#3056)

This commit is contained in:
DingDongSoLong4 2022-10-28 07:38:50 +02:00 committed by GitHub
parent 7b7d6758ef
commit db29246883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -377,14 +377,14 @@ func (rs sceneRoutes) Caption(w http.ResponseWriter, r *http.Request, lang strin
sub, err := video.ReadSubs(caption.Path(s.Path)) sub, err := video.ReadSubs(caption.Path(s.Path))
if err != nil { if err != nil {
logger.Warnf("error while reading subs: %v", err) logger.Warnf("error while reading subs: %v", err)
http.Error(w, readTxnErr.Error(), http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError)
return return
} }
var b bytes.Buffer var b bytes.Buffer
err = sub.WriteToWebVTT(&b) err = sub.WriteToWebVTT(&b)
if err != nil { if err != nil {
http.Error(w, readTxnErr.Error(), http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError)
return return
} }