This commit is contained in:
Niko Storni 2019-07-12 23:20:01 +02:00
parent 6f486717da
commit 8c2a8262e6
2 changed files with 4 additions and 3 deletions

View file

@ -649,7 +649,7 @@ func (s *Sync) startWorker(workerNum int) {
if err != nil {
logMsg := fmt.Sprintf("error processing video %s: %s", v.ID(), err.Error())
log.Errorln(logMsg)
if strings.Contains(err.Error(), "interrupted by user") {
if strings.Contains(strings.ToLower(err.Error()), "interrupted by user") {
return
}
fatalErrors := []string{
@ -885,6 +885,7 @@ func (s *Sync) processVideo(v video) (err error) {
"Unable to extract signature tokens",
"the video is too big to sync, skipping for now",
"video is too long to process",
"This video contains content from",
"no compatible format available for this video",
"Watch this video on YouTube.",
"have blocked it on copyright grounds",

View file

@ -198,7 +198,7 @@ func (v *YoutubeVideo) download(useIPv6 bool) error {
"--match-filter",
fmt.Sprintf("duration <= %d", int(math.Round(v.maxVideoLength*3600))),
"-fbestvideo[ext=mp4][height<=1080]+bestaudio[ext!=webm]",
"-o" + strings.TrimRight(v.getFullPath(), ".mp4"),
"-o" + strings.TrimSuffix(v.getFullPath(), ".mp4"),
"--merge-output-format",
"mp4",
}
@ -229,7 +229,7 @@ func (v *YoutubeVideo) download(useIPv6 bool) error {
sourceAddress,
)
} else {
log.Infoln("using IPv4: %s", sourceAddress)
log.Infof("using IPv4: %s", sourceAddress)
ytdlArgs = append(ytdlArgs,
"-4",
"--source-address",