From 4b4cee9fcccffb6df4fbc1f3236675271cad38db Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Thu, 25 Feb 2021 05:05:28 +0100 Subject: [PATCH] handle weird state --- sources/youtubeVideo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/youtubeVideo.go b/sources/youtubeVideo.go index 20c367b..18185e9 100644 --- a/sources/youtubeVideo.go +++ b/sources/youtubeVideo.go @@ -328,6 +328,9 @@ func (v *YoutubeVideo) download() error { return errors.Err("the video is too big to sync, skipping for now") } if string(errorLog) != "" { + if strings.Contains(string(errorLog), "HTTP Error 429") { + v.pool.SetThrottled(sourceAddress) + } log.Printf("Command finished with error: %v", errors.Err(string(errorLog))) _ = v.delete("due to error") return errors.Err(string(errorLog))