artists: fix artist finder to return nothing if it finds too many duplicates

This commit is contained in:
evazion
2022-03-26 15:08:55 -05:00
parent 44903abe28
commit 231075fb49
2 changed files with 8 additions and 0 deletions

View File

@@ -235,6 +235,9 @@ module ArtistFinder
break if url =~ SITE_BLACKLIST_REGEXP
end
# Assume no matches if we found too may duplicates.
return Artist.none if artists.size >= 4
Artist.where(id: artists.uniq.take(20))
end
end