@cloud411716/fancy-webnovel 4.11.2 → 4.11.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "4.11.2",
3
+ "version": "4.11.3",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -967,9 +967,15 @@ async function runCrawl(ctx, invocation, session, taskList) {
967
967
  let skippedMaterials = 0;
968
968
  let aborted = false;
969
969
 
970
- const progressText = () => queue
971
- ? `分析素材(子 Agent 并行:${queueStats.finished}/${queueStats.queued},并发 ${subagentWorkers})`
972
- : `分析素材(${queueStats.finished}/${jobs.length})`;
970
+ const progressText = () => {
971
+ if (taskList.index <= 3) {
972
+ return `采集作品(已入队 ${queueStats.queued},已分析 ${queueStats.finished})`;
973
+ }
974
+ if (queue) {
975
+ return `分析素材(子 Agent 并行:${queueStats.finished}/${queueStats.queued},并发 ${subagentWorkers})`;
976
+ }
977
+ return `分析素材(${queueStats.finished}/${jobs.length})`;
978
+ };
973
979
 
974
980
  const jobRecord = (job, extra = {}) => ({
975
981
  account_url: job.accountUrl,
@@ -1066,14 +1072,13 @@ async function runCrawl(ctx, invocation, session, taskList) {
1066
1072
  reason: '',
1067
1073
  });
1068
1074
  }
1075
+ queueStats.queued += 1;
1069
1076
  if (queue) {
1070
- queueStats.queued += 1;
1071
- if (taskList.index < 4) taskList.advance(4);
1072
1077
  queue.push(job);
1073
- taskList.progress(progressText());
1074
1078
  } else {
1075
1079
  jobs.push(job);
1076
1080
  }
1081
+ taskList.progress(progressText());
1077
1082
  };
1078
1083
 
1079
1084
  const runWorker = async () => {
@@ -1431,8 +1436,11 @@ async function runCrawl(ctx, invocation, session, taskList) {
1431
1436
 
1432
1437
  processedWorks += 1;
1433
1438
  video.account_url = account.url;
1434
- if (taskList.index < 4) taskList.advance(4);
1435
- taskList.progress(`分析素材(视频前 5 秒筛选:${video.title || videoId})`);
1439
+ if (taskList.index <= 3) {
1440
+ taskList.progress(`采集作品(视频前 5 秒筛选:${video.title || videoId})`);
1441
+ } else {
1442
+ taskList.progress(`分析素材(视频前 5 秒筛选:${video.title || videoId})`);
1443
+ }
1436
1444
  const relevance = await analyzeVideoRelevance(ctx, invocation, session, {
1437
1445
  root,
1438
1446
  accountUrl: account.url,
@@ -1600,6 +1608,10 @@ async function runCrawl(ctx, invocation, session, taskList) {
1600
1608
  }
1601
1609
 
1602
1610
  if (queue) {
1611
+ if (taskList.index < 4) {
1612
+ taskList.advance(4);
1613
+ taskList.progress(progressText());
1614
+ }
1603
1615
  queue.close();
1604
1616
  await Promise.all(workerPromises);
1605
1617
  } else if (jobs.length) {
@@ -1705,7 +1717,7 @@ function douyinTaskTitles(invocation) {
1705
1717
  '检查账号与素材库',
1706
1718
  'LLM 能力自检(图片 / 视频)',
1707
1719
  '扫描账号主页',
1708
- '采集图文 / 视频 / 文章作品',
1720
+ '采集作品',
1709
1721
  '分析素材',
1710
1722
  '写入素材库',
1711
1723
  ];