fix: split on & when deriving artist folder name
"Arriez & King Dif" was used as-is for the folder; now splits on , ; & so only the first artist is used: "Arriez". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
11a31f85aa
commit
0823c1ca86
2 files changed
+2
-2
No files matched your search
@@ -49,7 +49,7 @@ function buildVariantFilter(title) {
|
||||
|
||||
async function downloadTrack({ jobId, artist, albumArtist, title, album, year, trackNum, totalTracks, discNum, discTotal, compilation, genre, artworkUrl, explicit, outputDir, durationMs, sourceUrl }) {
|
||||
const mainArtist = albumArtist || artist;
|
||||
const safeArtist = sanitize(mainArtist.split(',')[0].trim());
|
||||
const safeArtist = sanitize(mainArtist.split(/[,;&]/)[0].trim());
|
||||
const safeAlbum = sanitize(album || 'Singles');
|
||||
const dir = path.join(outputDir || CONFIG.musicPath, safeArtist, safeAlbum);
|
||||
fs.mkdirSync(dir, { recursive: true });
|
||||
|
||||
Reference in new issue
Block a user