Skip to content

Commit

Permalink
chore(device): Clean up segments before searching
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Nov 2, 2023
1 parent 9ea42d8 commit 91cae83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/device/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ func (d *Device) queryVideoId() {
d.queryState = QueryStarted
d.meta.PrevArtist = d.meta.CurrArtist
d.meta.PrevTitle = d.meta.CurrTitle
d.unmuteSegment()
d.segments = nil
go func() {
if err := util.Retry(d.ctx, 3, time.Second, func(try uint) (err error) {
contentId, err := youtube.QueryVideoId(d.ctx, d.meta.CurrArtist, d.meta.CurrTitle)
Expand Down

0 comments on commit 91cae83

Please sign in to comment.