beatport_importer: Fix API redirect issue

This commit is contained in:
zyoshoka 2023-06-30 21:26:47 +09:00 committed by David Kellner
parent d583e184c6
commit e4f369069d

View file

@ -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)));