MBIDfromUrl(): make it use a cache key instead of url

This commit is contained in:
Laurent Monin 2015-06-12 11:24:55 +02:00
parent dab6f5ccc1
commit 42086bf1af

View file

@ -326,8 +326,10 @@ function getCacheKeyFromUrl(url, discogs_type, mb_type) {
return false;
}
function MBIDfromUrl(url, discogs_type) {
return mblinks.resolveMBID(getCleanUrl(url, discogs_type));
function MBIDfromUrl(url, discogs_type, mb_type) {
var cachekey = getCacheKeyFromUrl(url, discogs_type, mb_type);
if (!cachekey) return '';
return mblinks.resolveMBID(cachekey);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////