Skip to content

Commit

Permalink
fix(youtube): Remove title check, compare channel titles ignoring case
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Feb 1, 2024
1 parent cba13f4 commit efdb2b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/youtube/youtube.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down

0 comments on commit efdb2b5

Please sign in to comment.