From efdb2b5f4debe1437dfb5d72ddf92d59bbdf23d2 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Thu, 1 Feb 2024 04:12:23 -0600 Subject: [PATCH] fix(youtube): Remove title check, compare channel titles ignoring case --- internal/youtube/youtube.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/youtube/youtube.go b/internal/youtube/youtube.go index c652097..d5e370d 100644 --- a/internal/youtube/youtube.go +++ b/internal/youtube/youtube.go @@ -56,7 +56,7 @@ func QueryVideoId(ctx context.Context, artist, title string) (string, error) { if item == nil || item.Snippet == nil { continue } - if !strings.HasPrefix(item.Snippet.ChannelTitle, artist) || !strings.HasPrefix(item.Snippet.Title, title) { + if !strings.Contains(strings.ToLower(item.Snippet.ChannelTitle), strings.ToLower(artist)) { continue } if item.Id == nil || item.Id.VideoId == "" {