mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-12 11:22:28 +00:00
beatport_importer: Fix API redirect issue
This commit is contained in:
parent
d583e184c6
commit
e4f369069d
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ $(document).ready(function () {
|
|||
let release_url = window.location.href.replace('/?.*$/', '').replace(/#.*$/, '');
|
||||
let release = retrieveReleaseInfo(release_url, release_data);
|
||||
|
||||
const track_urls = release_data.tracks.map(url => url.replace('api.beatport.com', 'www.beatport.com/api'));
|
||||
const track_urls = release_data.tracks.map(url => url.replace('api.beatport.com', 'www.beatport.com/api')).replace(/\/$/, '');
|
||||
let results = [];
|
||||
const promises = track_urls.map((url, index) => $.getJSON(url).then(response => (results[index] = response)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue