/artists: add wildcard, regex search to url field (#3900)

Allow searching the URL field by regex or by wildcard.

If the query looks like `/twitter/` do a regex search, otherwise if it
looks like `http://www.twitter.com/*` do a wildcard search, otherwise if
it looks like an url do an artist finder search, lastly if it looks like
`twitter` do a `*twitter*` search.
This commit is contained in:
evazion
2018-09-21 21:03:24 -05:00
parent a4608daf38
commit 09a8198979
3 changed files with 25 additions and 4 deletions

View File

@@ -153,7 +153,7 @@ module Sources
end
def artists
Artist.url_matches(normalize_for_artist_finder)
Artist.find_artists(normalize_for_artist_finder)
end
def file_url