discogs_importer: also match artist simple alias

This commit is contained in:
Laurent Monin 2015-06-12 16:00:04 +02:00
parent c1c1f1682e
commit c5ad8604bf

View file

@ -223,7 +223,7 @@ var link_infos = {};
// Parse discogs url to extract info, returns a key and set link_infos for this key
// the key is in the form discogs_type/discogs_id
function getDiscogsLinkKey(url) {
var re = /^http:\/\/(?:www|api)\.discogs\.com\/(?:(?:(?!sell).+|sell.+)\/)?(master|release|artist|label)s?\/(\d+)(?:[^\?#]*)(?:\?noanv=1)?$/i;
var re = /^http:\/\/(?:www|api)\.discogs\.com\/(?:(?:(?!sell).+|sell.+)\/)?(master|release|artist|label)s?\/(\d+)(?:[^\?#]*)(?:\?noanv=1|\?anv=[^=]+)?$/i;
if (m = re.exec(url)) {
var key = m[1] + '/' + m[2];
if (!link_infos[key]) {