Fix JS regex to accept Spotify URLs with locale prefix (intl-fr, en, etc.)

This commit is contained in:
2026-03-21 01:21:42 +01:00
parent 198a005ac7
commit 5387e3abba

View File

@@ -125,7 +125,7 @@
let currentDownloadId = null; let currentDownloadId = null;
let eventSource = null; let eventSource = null;
const spotifyPattern = /^https?:\/\/open\.spotify\.com\/(track|album|playlist)\/[\w-]+/; const spotifyPattern = /^https?:\/\/open\.spotify\.com\/[^/]+\/(track|album|playlist)\/[\w-]+/;
function validateUrls(text) { function validateUrls(text) {
const urls = text.split('\n').filter(u => u.trim()); const urls = text.split('\n').filter(u => u.trim());