diff --git a/package-lock.json b/package-lock.json
index 38f7181..e730c53 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "dev",
"license": "MIT",
"dependencies": {
- "@distube/ytdl-core": "^4.13.7",
+ "@distube/ytdl-core": "^4.14.3",
"chalk": "^4.1.2",
"commander": "^12.1.0",
"easy-table": "^1.2.0",
@@ -114,9 +114,9 @@
}
},
"node_modules/@distube/ytdl-core": {
- "version": "4.13.7",
- "resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.13.7.tgz",
- "integrity": "sha512-xpovwZVPwQ0R4Mrwt/fhh1rqmBjiZ5qj30ck5kz+mQJ5XPzW9dUiTDz89qCxO3YvgbCAqaC5BNNnWiFC2uCV5Q==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.14.3.tgz",
+ "integrity": "sha512-z6i5EVGEuKhuvuRNyIqafBSs5aRA28HssnWehCRhEtYrxeFgXImfmpKTjUusHYU5vQt1swSVPVb2JCd22P0CPA==",
"license": "MIT",
"dependencies": {
"http-cookie-agent": "^6.0.5",
@@ -124,10 +124,10 @@
"miniget": "^4.2.3",
"sax": "^1.4.1",
"tough-cookie": "^4.1.4",
- "undici": "^6.19.2"
+ "undici": "five"
},
"engines": {
- "node": ">=16"
+ "node": ">=14.0"
},
"funding": {
"url": "https://github.com/distubejs/ytdl-core?sponsor"
diff --git a/package.json b/package.json
index 4aa0a99..52419ac 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
"typescript": "^5.4.5"
},
"dependencies": {
- "@distube/ytdl-core": "^4.13.7",
+ "@distube/ytdl-core": "^4.14.3",
"chalk": "^4.1.2",
"commander": "^12.1.0",
"easy-table": "^1.2.0",
diff --git a/src/app.ts b/src/app.ts
index 9a630e3..022c810 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -12,7 +12,8 @@ import {
} from "./cli/functions";
import { Wrong } from "./cli/logs";
-process.env.YTDL_NO_UPDATE = "1";
+import "./preload";
+
const app = new Command();
app
@@ -30,14 +31,9 @@ app
app
.command("get")
- .description("show youtube link details for you :3")
+ .description("show youtube link details")
.argument("", "youtube link")
.addOption(new Option("-h, --help").hideHelp())
- .addHelpText(
- "after",
- `${chalk.green("\nExamples:")}
- ${chalk.yellow("get")} youtube_link`
- )
.action(async (link, options) => {
checkLink(link);
linkInfomation(link);
@@ -45,34 +41,12 @@ app
app
.command("down")
- .description("download youtube videos/audios for you :P")
+ .description("download youtube video/audio")
.argument("", "youtube link")
.option("-v ", "pass the video tag you got from the get command")
.option("-a ", "pass the audio tag you got from the get command")
.option("--mp3", "this flag is only used together with -a flag")
.addOption(new Option("-h, --help").hideHelp())
- .addHelpText(
- "after",
- `${chalk.green("\nExamples:")}
- standard download => ${chalk.yellow(
- "down"
- )} youtube_link -v tag_number -a tag_number
- ${chalk.hex("#DC84F3")(
- `In standard download, I download video and audio separately and merging them with ffmpeg`
- )}
- ${chalk.hex("#DC84F3")(
- `If you don't provide video tag and audio tag, I'll download highest qualities of them`
- )}\n
- download only video => ${chalk.yellow("down")} youtube_link -v tag_number\n
- download only audio => ${chalk.yellow(
- "down"
- )} youtube_link -a tag_number --mp3
- ${chalk.hex("#DC84F3")(
- `If you use ${chalk.blue("--mp3")} with ${chalk.blue(
- "-a"
- )} flag, It will convert audio to mp3 with ffmpeg`
- )}`
- )
.action(async (link, options) => {
checkLink(link);
let isVideoTagValid,
diff --git a/src/preload.ts b/src/preload.ts
new file mode 100644
index 0000000..f747247
--- /dev/null
+++ b/src/preload.ts
@@ -0,0 +1 @@
+process.env.YTDL_NO_UPDATE = "1";