@lzwme/m3u8-dl 0.0.6 → 0.0.7
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/cjs/lib/m3u8-convert.js +1 -1
- package/cjs/lib/video-search.js +1 -1
- package/cjs/m3u8-batch-download.js +6 -0
- package/package.json +13 -13
package/cjs/lib/m3u8-convert.js
CHANGED
|
@@ -21,7 +21,7 @@ async function m3u8Convert(options, data) {
|
|
|
21
21
|
if (process.platform === 'win32')
|
|
22
22
|
filesAllArr = filesAllArr.map(d => d.replaceAll('\\', '/'));
|
|
23
23
|
await node_fs_1.promises.writeFile(inputFilePath, 'ffconcat version 1.0\nfile ' + filesAllArr.join('\nfile '));
|
|
24
|
-
const cmd = `ffmpeg -y -f concat -safe 0 -i ${inputFilePath} -acodec copy -vcodec copy -absf aac_adtstoasc ${filepath}`;
|
|
24
|
+
const cmd = `ffmpeg -y -f concat -safe 0 -i ${inputFilePath} -acodec copy -vcodec copy -absf aac_adtstoasc "${filepath}"`;
|
|
25
25
|
utils_1.logger.debug('[convert to mp4]cmd:', (0, console_log_colors_1.cyan)(cmd));
|
|
26
26
|
const r = (0, fe_utils_1.execSync)(cmd);
|
|
27
27
|
ffmpegSupport = !r.error;
|
package/cjs/lib/video-search.js
CHANGED
|
@@ -92,7 +92,7 @@ class VideoSearch {
|
|
|
92
92
|
needUpdate = Date.now() - cache.remoteConfig.updateTime > 1 * 60 * 60 * 1000;
|
|
93
93
|
}
|
|
94
94
|
if (needUpdate) {
|
|
95
|
-
const url = this.options.remoteConfigUrl || 'https://ghproxy.com/raw.githubusercontent.com/lzwme/m3u8-dl/main/test/remote-config.json';
|
|
95
|
+
const url = this.options.remoteConfigUrl || 'https://mirror.ghproxy.com/raw.githubusercontent.com/lzwme/m3u8-dl/main/test/remote-config.json';
|
|
96
96
|
const { data } = await req.get(url, null, { 'content-type': 'application/json' }, { rejectUnauthorized: false });
|
|
97
97
|
utils_js_1.logger.debug('加载远程配置', data);
|
|
98
98
|
if (Array.isArray(data.apiSites)) {
|
|
@@ -8,6 +8,8 @@ const utils_1 = require("./lib/utils");
|
|
|
8
8
|
async function formatUrls(urls, options) {
|
|
9
9
|
const taskset = new Map();
|
|
10
10
|
for (const url of urls) {
|
|
11
|
+
if (!url)
|
|
12
|
+
continue;
|
|
11
13
|
if ((0, node_fs_1.existsSync)(url)) {
|
|
12
14
|
const content = await node_fs_1.promises.readFile(url, 'utf8');
|
|
13
15
|
if (content.includes('.m3u8')) {
|
|
@@ -55,6 +57,10 @@ async function m3u8BatchDownload(urls, options) {
|
|
|
55
57
|
}
|
|
56
58
|
};
|
|
57
59
|
run();
|
|
60
|
+
}).then(d => {
|
|
61
|
+
if (m3u8_download_1.workPoll.freeNum === m3u8_download_1.workPoll.numThreads)
|
|
62
|
+
m3u8_download_1.workPoll.close();
|
|
63
|
+
return d;
|
|
58
64
|
});
|
|
59
65
|
}
|
|
60
66
|
exports.m3u8BatchDownload = m3u8BatchDownload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lzwme/m3u8-dl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Batch download of m3u8 files and convert to mp4",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"types": "cjs/index.d.ts",
|
|
@@ -44,21 +44,21 @@
|
|
|
44
44
|
"registry": "https://registry.npmjs.com"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@lzwme/fed-lint-helper": "^2.
|
|
48
|
-
"@types/node": "^20.
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
50
|
-
"@typescript-eslint/parser": "^
|
|
51
|
-
"eslint": "^8.
|
|
52
|
-
"eslint-config-prettier": "^9.
|
|
53
|
-
"eslint-plugin-prettier": "^5.
|
|
54
|
-
"husky": "^
|
|
55
|
-
"prettier": "^3.
|
|
47
|
+
"@lzwme/fed-lint-helper": "^2.5.2",
|
|
48
|
+
"@types/node": "^20.11.20",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
50
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
51
|
+
"eslint": "^8.56.0",
|
|
52
|
+
"eslint-config-prettier": "^9.1.0",
|
|
53
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
54
|
+
"husky": "^9.0.11",
|
|
55
|
+
"prettier": "^3.2.5",
|
|
56
56
|
"standard-version": "^9.5.0",
|
|
57
|
-
"typescript": "^5.
|
|
57
|
+
"typescript": "^5.3.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@lzwme/fe-utils": "^1.
|
|
61
|
-
"commander": "^
|
|
60
|
+
"@lzwme/fe-utils": "^1.6.0",
|
|
61
|
+
"commander": "^12.0.0",
|
|
62
62
|
"console-log-colors": "^0.4.0",
|
|
63
63
|
"enquirer": "^2.4.1",
|
|
64
64
|
"m3u8-parser": "^7.1.0"
|