fix(backend): treat yt-dlp exit code 101 as success
Code 101 means --max-downloads was reached — the file was downloaded successfully. Treating it as error caused the ffmpeg/metadata step to be skipped, leaving files with no tags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
5db9938f49
commit
9ca6e79b7b
1 file changed
+2
-1
@@ -244,7 +244,8 @@ async function downloadTrack({ jobId, artist, albumArtist, title, album, year, t
|
||||
});
|
||||
proc.on('error', reject);
|
||||
proc.on('close', code =>
|
||||
code === 0 ? resolve() : reject(new Error(`yt-dlp code ${code}: ${stderr.slice(-300)}`))
|
||||
// 101 = --max-downloads reached (not an error — file was downloaded successfully)
|
||||
(code === 0 || code === 101) ? resolve() : reject(new Error(`yt-dlp code ${code}: ${stderr.slice(-300)}`))
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user