@jnzlab/easy-ytdlp 1.1.3 → 1.1.4
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/CHANGELOG.md +10 -1
- package/dist/cli.js +31 -4
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.1.
|
|
3
|
+
## 1.1.4 - 2026-09-08
|
|
4
4
|
|
|
5
5
|
### Fixed
|
|
6
6
|
|
|
7
|
+
- Interactive mode no longer fails with "Failed to fetch metadata for any of
|
|
8
|
+
the provided URLs" on videos that have no pre-merged format. `yt-dlp-wrap`
|
|
9
|
+
silently added `-f best` to the metadata call, which YouTube now rejects for
|
|
10
|
+
many videos; the metadata fetch passes `--ignore-no-formats-error` and its
|
|
11
|
+
own format flag instead. When every URL fails, the underlying yt-dlp error is
|
|
12
|
+
now shown instead of a generic message.
|
|
13
|
+
- `--version` now reads the version from `package.json` instead of a
|
|
14
|
+
hardcoded constant that had drifted from the published version.
|
|
15
|
+
- Removed an accidental dependency of the package on itself.
|
|
7
16
|
- Pasting a bare YouTube playlist link no longer fails/hangs at startup. The
|
|
8
17
|
metadata fetch now uses `--flat-playlist` for playlist URLs (fast, one small
|
|
9
18
|
line per video) and shows the playlist title + video count instead of dumping
|
package/dist/cli.js
CHANGED
|
@@ -391,8 +391,15 @@ function isPlaylistOnlyUrl(url) {
|
|
|
391
391
|
return true;
|
|
392
392
|
}
|
|
393
393
|
function metadataArgs(url) {
|
|
394
|
-
const scopeFlags = isPlaylistOnlyUrl(url) ? ["--flat-playlist"
|
|
395
|
-
return [
|
|
394
|
+
const scopeFlags = isPlaylistOnlyUrl(url) ? ["--flat-playlist"] : ["--no-playlist"];
|
|
395
|
+
return [
|
|
396
|
+
...youtubeCompatFlags(),
|
|
397
|
+
...scopeFlags,
|
|
398
|
+
"--ignore-no-formats-error",
|
|
399
|
+
"-f",
|
|
400
|
+
"b",
|
|
401
|
+
url
|
|
402
|
+
];
|
|
396
403
|
}
|
|
397
404
|
function normalizePlaylistMeta(raw, url) {
|
|
398
405
|
const entries = Array.isArray(raw) ? raw : raw && typeof raw === "object" ? [raw] : [];
|
|
@@ -1221,7 +1228,17 @@ async function askQuestions(url, meta) {
|
|
|
1221
1228
|
}
|
|
1222
1229
|
|
|
1223
1230
|
// src/cli.ts
|
|
1224
|
-
|
|
1231
|
+
function readCliVersion() {
|
|
1232
|
+
try {
|
|
1233
|
+
const pkg = JSON.parse(
|
|
1234
|
+
readFileSync(new URL("../package.json", import.meta.url), "utf8")
|
|
1235
|
+
);
|
|
1236
|
+
return pkg.version ?? "0.0.0";
|
|
1237
|
+
} catch {
|
|
1238
|
+
return "0.0.0";
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
var CLI_VERSION = readCliVersion();
|
|
1225
1242
|
function fail(message) {
|
|
1226
1243
|
p3.log.error(message);
|
|
1227
1244
|
process.exit(1);
|
|
@@ -1462,7 +1479,17 @@ async function runWizard(urlsArg, opts = {}) {
|
|
|
1462
1479
|
}
|
|
1463
1480
|
if (videoInfos.length === 0) {
|
|
1464
1481
|
spinner2.stop("Could not fetch metadata");
|
|
1465
|
-
|
|
1482
|
+
const reasons = metaResults.filter(
|
|
1483
|
+
(r) => r.status === "rejected"
|
|
1484
|
+
).map(
|
|
1485
|
+
(r) => r.reason instanceof Error ? r.reason.message : String(r.reason)
|
|
1486
|
+
);
|
|
1487
|
+
p3.log.error(
|
|
1488
|
+
[
|
|
1489
|
+
"Failed to fetch metadata for any of the provided URLs.",
|
|
1490
|
+
...new Set(reasons)
|
|
1491
|
+
].join("\n\n")
|
|
1492
|
+
);
|
|
1466
1493
|
process.exit(1);
|
|
1467
1494
|
}
|
|
1468
1495
|
spinner2.stop("Metadata loaded");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jnzlab/easy-ytdlp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "A user-friendly interactive CLI wrapper for yt-dlp — no Python or flag memorization required",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli.js",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@clack/prompts": "^0.10.0",
|
|
50
|
-
"@jnzlab/easy-ytdlp": "^1.1.0",
|
|
51
50
|
"cli-progress": "^3.12.0",
|
|
52
51
|
"commander": "^13.1.0",
|
|
53
52
|
"env-paths": "^3.0.0",
|