diff --git a/manager/ytsync.go b/manager/ytsync.go index 8f73ec1..1a5ed45 100644 --- a/manager/ytsync.go +++ b/manager/ytsync.go @@ -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", diff --git a/sources/youtubeVideo.go b/sources/youtubeVideo.go index 61d7a01..ac25c9c 100644 --- a/sources/youtubeVideo.go +++ b/sources/youtubeVideo.go @@ -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",