artists: fix artist finder to return nothing if it finds too many duplicates
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user