From 73f39508b643e10428d8a016cd2590f6a2672f90 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Tue, 3 Oct 2023 02:58:31 -0500 Subject: [PATCH] chore(device): Decrease YouTube search retries due to low rate limit Ref #16 --- internal/device/watch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/device/watch.go b/internal/device/watch.go index 8070033..f5b2d11 100644 --- a/internal/device/watch.go +++ b/internal/device/watch.go @@ -308,7 +308,7 @@ func (d *Device) queryVideoId(castMedia *cast.Media) { d.prevArtist = currArtist d.prevTitle = currTitle go func() { - if err := util.Retry(d.ctx, 10, 500*time.Millisecond, func(try uint) (err error) { + if err := util.Retry(d.ctx, 3, time.Second, func(try uint) (err error) { castMedia.Media.ContentId, err = youtube.QueryVideoId(d.ctx, currArtist, currTitle) if err != nil { d.logger.Error("YouTube search failed.", "error", err.Error())