ytdwn 1.1.0 → 1.1.2
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/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { program } from "commander";
|
|
|
7
7
|
import { join } from "path";
|
|
8
8
|
var APP_NAME = "ytdwn";
|
|
9
9
|
var APP_TAGLINE = "YouTube to MP3/MP4 • Fast & Simple";
|
|
10
|
-
var APP_VERSION = "1.1.
|
|
10
|
+
var APP_VERSION = "1.1.2";
|
|
11
11
|
var DEFAULT_AUDIO_FORMAT = "mp3";
|
|
12
12
|
var DEFAULT_AUDIO_QUALITY = "0";
|
|
13
13
|
var CONCURRENT_FRAGMENTS = "8";
|
|
@@ -140,7 +140,7 @@ var SettingsServiceLive = Layer.succeed(SettingsService, {
|
|
|
140
140
|
|
|
141
141
|
// src/services/BinaryService.ts
|
|
142
142
|
import { Effect as Effect4, Context as Context2, Layer as Layer2 } from "effect";
|
|
143
|
-
import
|
|
143
|
+
import YTDlpWrapModule from "yt-dlp-wrap";
|
|
144
144
|
import { platform } from "os";
|
|
145
145
|
import { join as join3 } from "path";
|
|
146
146
|
|
|
@@ -158,6 +158,7 @@ var fetchBinaryWithRetry = (url, maxRetries = 2) => Effect3.tryPromise({
|
|
|
158
158
|
}).pipe(Effect3.retry(Schedule.recurs(maxRetries).pipe(Schedule.addDelay(() => "1 second"))));
|
|
159
159
|
|
|
160
160
|
// src/services/BinaryService.ts
|
|
161
|
+
var YTDlpWrap = YTDlpWrapModule.default ?? YTDlpWrapModule;
|
|
161
162
|
var BINARY_NAMES = {
|
|
162
163
|
win32: ["yt-dlp.exe"],
|
|
163
164
|
darwin: {
|
|
@@ -431,7 +432,7 @@ function buildArgs(url, options, downloadDir) {
|
|
|
431
432
|
];
|
|
432
433
|
const formatArgs = isVideo ? [
|
|
433
434
|
"-f",
|
|
434
|
-
|
|
435
|
+
"bestvideo+bestaudio/best",
|
|
435
436
|
"--merge-output-format",
|
|
436
437
|
format
|
|
437
438
|
] : [
|
package/dist/src/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const APP_NAME = "ytdwn";
|
|
2
2
|
export declare const APP_TAGLINE = "YouTube to MP3/MP4 \u2022 Fast & Simple";
|
|
3
|
-
export declare const APP_VERSION = "1.1.
|
|
3
|
+
export declare const APP_VERSION = "1.1.2";
|
|
4
4
|
export declare const DEFAULT_AUDIO_FORMAT = "mp3";
|
|
5
5
|
export declare const DEFAULT_AUDIO_QUALITY = "0";
|
|
6
6
|
export declare const DEFAULT_VIDEO_FORMAT = "mp4";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Effect, Context, Layer } from "effect";
|
|
2
|
-
import
|
|
2
|
+
import YTDlpWrapModule from "yt-dlp-wrap";
|
|
3
|
+
declare const YTDlpWrap: typeof YTDlpWrapModule;
|
|
3
4
|
import { BinaryNotFoundError, BinaryDownloadError, type DownloadError, type FileWriteError, type DirectoryCreateError } from "../lib/errors";
|
|
4
5
|
import { SettingsService } from "./SettingsService";
|
|
5
6
|
declare const BinaryService_base: Context.TagClass<BinaryService, "BinaryService", {
|
|
6
7
|
readonly findBinary: Effect.Effect<string | null>;
|
|
7
8
|
readonly requireBinary: Effect.Effect<string, BinaryNotFoundError>;
|
|
8
|
-
readonly getYtDlpWrap: Effect.Effect<YTDlpWrap
|
|
9
|
+
readonly getYtDlpWrap: Effect.Effect<InstanceType<typeof YTDlpWrap>, BinaryNotFoundError>;
|
|
9
10
|
readonly downloadLatestBinary: Effect.Effect<string, BinaryDownloadError | DownloadError | FileWriteError | DirectoryCreateError>;
|
|
10
11
|
}>;
|
|
11
12
|
export declare class BinaryService extends BinaryService_base {
|