diff --git a/youtubedl.go b/youtubedl.go index 42502fc5dbab0392abf219d0553e4b00c00bd52f..f4a9851dffb46a9e292a86c7fc8eb96f5e38225f 100644 --- a/youtubedl.go +++ b/youtubedl.go @@ -397,14 +397,14 @@ func loadYouTubeAnnotationsVideo(videoID string, language string, collection *mo var subs annotation.Caption err := errors.New("") - // priorize manual subtitle before downloading automatic youtube caption (autogenerated) - subs, err = GetSubtitle(false, videoID, language) + // priorize auto caption before trying to download manual youtube subtitle + subs, err = GetSubtitle(true, videoID, language) if err != nil { _, ok := err.(ErrYoutubeDLLangNotSupported) if ok { log.WithFields(log.Fields{"videoID": videoID, "language": language}).Trace("No manual subtitle found") - // download automatic caption - subs, err = GetSubtitle(true, videoID, language) + // download manual subtitle if present + subs, err = GetSubtitle(false, videoID, language) if err != nil { return err }