@evio/ffai 1.0.5 → 1.0.6

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
@@ -25,7 +25,7 @@ program
25
25
  const taskPkgValue = require(taskFile);
26
26
  for (let i = 0; i < taskPkgValue.length; i++) {
27
27
  const props = taskPkgValue[i];
28
- await (0, task_1.RunTask)(props, i);
28
+ await (0, task_1.RunTask)(props, i, taskPkgValue.length);
29
29
  }
30
30
  });
31
31
  program.parseAsync();
package/dist/task.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import { TaskProps } from "./interface.js";
2
- export declare function RunTask(props: TaskProps, index: number): Promise<void>;
2
+ export declare function RunTask(props: TaskProps, index: number, total: number): Promise<void>;
package/dist/task.js CHANGED
@@ -7,10 +7,10 @@ const node_fs_1 = require("node:fs");
7
7
  const signale_1 = require("signale");
8
8
  const lib_1 = require("./lib");
9
9
  const fontfile = '/System/Library/Fonts/Supplemental/Songti.ttc';
10
- async function RunTask(props, index) {
10
+ async function RunTask(props, index, total) {
11
11
  const cmd = new signale_1.Signale({
12
12
  interactive: true,
13
- scope: 'task-' + (index + 1),
13
+ scope: `task:${(index + 1)}/${total}`,
14
14
  });
15
15
  cmd.await(`[%d/7] - 正在进行第${index + 1}个任务...`, 1);
16
16
  const cwd = process.cwd();
@@ -61,6 +61,8 @@ async function RunTask(props, index) {
61
61
  (0, node_fs_1.rmdirSync)(videoDirectory);
62
62
  }
63
63
  cmd.success(`[%d/7] - ${output_concat_audio_subtitle}`, 7);
64
+ // 输出换行,确保下一个任务在新行开始
65
+ console.log('');
64
66
  }
65
67
  async function getVideoFiles(videos) {
66
68
  const cwd = process.cwd();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evio/ffai",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "一个基于 FFmpeg 的命令行工具,用于批量处理视频和音频文件,支持视频转码、音频合并、字幕添加等功能。",
5
5
  "main": "dist/lib.js",
6
6
  "scripts": {