diff --git a/static/js/album.js b/static/js/album.js index efe866f..8de0208 100644 --- a/static/js/album.js +++ b/static/js/album.js @@ -194,7 +194,9 @@ async function startDownload(url, type, item, albumType) { deezer = '', spotifyQuality = 'NORMAL', deezerQuality = 'MP3_128', - realTime = false + realTime = false, + customDirFormat = '', + customTrackFormat = '' } = config; const service = url.includes('open.spotify.com') ? 'spotify' : 'deezer'; @@ -220,6 +222,14 @@ async function startDownload(url, type, item, albumType) { apiUrl += '&real_time=true'; } + // Append custom directory and file format settings if provided. + if (customDirFormat) { + apiUrl += `&custom_dir_format=${encodeURIComponent(customDirFormat)}`; + } + if (customTrackFormat) { + apiUrl += `&custom_file_format=${encodeURIComponent(customTrackFormat)}`; + } + try { const response = await fetch(apiUrl); const data = await response.json();