Skip to content

Commit

Permalink
chore(device): Decrease YouTube search retries due to low rate limit
Browse files Browse the repository at this point in the history
Ref #16
  • Loading branch information
gabe565 committed Oct 3, 2023
1 parent a0de9b7 commit 73f3950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/device/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 73f3950

Please sign in to comment.