@bililive-tools/douyu-recorder 1.15.0 → 1.16.0
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/index.js +2 -16
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import { defaultFromJSON, defaultToJSON, genRecorderUUID, genRecordUUID, utils,
|
|
|
3
3
|
import { live } from "douyu-api";
|
|
4
4
|
import { getInfo, getStream } from "./stream.js";
|
|
5
5
|
import { getRoomInfo } from "./dy_api.js";
|
|
6
|
-
import { ensureFolderExist } from "./utils.js";
|
|
7
6
|
import { createDYClient } from "./dy_client/index.js";
|
|
8
7
|
import { giftMap, colorTab } from "./danma.js";
|
|
9
8
|
function createRecorder(opts) {
|
|
@@ -138,6 +137,7 @@ const checkLiveStatusAndRecord = async function ({ getSavePath, banLiveId, isMan
|
|
|
138
137
|
startTime: opts.startTime,
|
|
139
138
|
liveStartTime,
|
|
140
139
|
recordStartTime,
|
|
140
|
+
extraMs: opts.extraMs,
|
|
141
141
|
}),
|
|
142
142
|
disableDanma: this.disableProvideCommentsWhenRecording,
|
|
143
143
|
videoFormat: this.videoFormat ?? "auto",
|
|
@@ -147,20 +147,6 @@ const checkLiveStatusAndRecord = async function ({ getSavePath, banLiveId, isMan
|
|
|
147
147
|
const info = await getInfo(this.channelId);
|
|
148
148
|
return info;
|
|
149
149
|
});
|
|
150
|
-
const savePath = getSavePath({
|
|
151
|
-
owner,
|
|
152
|
-
title,
|
|
153
|
-
startTime: Date.now(),
|
|
154
|
-
liveStartTime,
|
|
155
|
-
recordStartTime,
|
|
156
|
-
});
|
|
157
|
-
try {
|
|
158
|
-
ensureFolderExist(savePath);
|
|
159
|
-
}
|
|
160
|
-
catch (err) {
|
|
161
|
-
this.state = "idle";
|
|
162
|
-
throw err;
|
|
163
|
-
}
|
|
164
150
|
const handleVideoCreated = async ({ filename, title, cover, rawFilename }) => {
|
|
165
151
|
this.emit("videoFileCreated", { filename, cover, rawFilename });
|
|
166
152
|
if (title && this?.liveInfo) {
|
|
@@ -372,7 +358,7 @@ const checkLiveStatusAndRecord = async function ({ getSavePath, banLiveId, isMan
|
|
|
372
358
|
recorderType: downloader.type,
|
|
373
359
|
url: stream.url,
|
|
374
360
|
downloaderArgs,
|
|
375
|
-
savePath:
|
|
361
|
+
savePath: downloader.videoFilePath,
|
|
376
362
|
stop,
|
|
377
363
|
cut,
|
|
378
364
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bililive-tools/douyu-recorder",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "bililive-tools douyu recorder implemention",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"lodash-es": "^4.17.21",
|
|
42
42
|
"axios": "^1.15.0",
|
|
43
43
|
"douyu-api": "^0.2.1",
|
|
44
|
-
"@bililive-tools/manager": "^1.
|
|
44
|
+
"@bililive-tools/manager": "^1.16.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/ws": "^8.5.13"
|