mix-id 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/audio.mjs +3 -4
- package/package.json +1 -1
package/lib/audio.mjs
CHANGED
|
@@ -58,11 +58,11 @@ export function downloadURL(url, outputDir) {
|
|
|
58
58
|
|
|
59
59
|
const dl = spawnSync('yt-dlp', [
|
|
60
60
|
'-x', '--audio-format', 'mp3', '--audio-quality', '0',
|
|
61
|
-
'-o', outTemplate, '--no-playlist', '--progress', url,
|
|
61
|
+
'-o', outTemplate, '--no-playlist', '--progress', '--newline', url,
|
|
62
62
|
], {
|
|
63
63
|
encoding: 'utf8',
|
|
64
64
|
timeout: 600_000,
|
|
65
|
-
stdio: ['pipe', '
|
|
65
|
+
stdio: ['pipe', 'inherit', 'inherit'],
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
// Find the output file
|
|
@@ -74,8 +74,7 @@ export function downloadURL(url, outputDir) {
|
|
|
74
74
|
if (existsSync(alt)) return alt;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
throw new Error(`Download failed:\n${errMsg}`);
|
|
77
|
+
throw new Error('Download failed. Check the URL and try again.');
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
/** Format file size for display. */
|