skillfree 0.1.15 → 0.1.16
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/bin/skillfree.js +4 -3
- package/package.json +1 -1
- package/scripts/commands/pilot.js +1 -1
package/bin/skillfree.js
CHANGED
|
@@ -120,10 +120,11 @@ program
|
|
|
120
120
|
console.log(`\n📋 任务 ${taskId}`)
|
|
121
121
|
console.log(` 状态:${task.status}`)
|
|
122
122
|
console.log(` 模型:${task.model}`)
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
const videoUrl = task.result_url || task.output_url
|
|
124
|
+
if (task.status === 'completed' && videoUrl) {
|
|
125
|
+
console.log(` 链接:${videoUrl}`)
|
|
125
126
|
if (flags.output) {
|
|
126
|
-
const resp = await fetch(
|
|
127
|
+
const resp = await fetch(videoUrl)
|
|
127
128
|
fs.writeFileSync(flags.output, Buffer.from(await resp.arrayBuffer()))
|
|
128
129
|
console.log(`✅ 已下载到 ${flags.output}`)
|
|
129
130
|
} else {
|
package/package.json
CHANGED
|
@@ -369,7 +369,7 @@ async function pilot(flags) {
|
|
|
369
369
|
|
|
370
370
|
if (status === 'completed') {
|
|
371
371
|
console.log('\n')
|
|
372
|
-
const videoUrl = task.output_url
|
|
372
|
+
const videoUrl = task.result_url || task.output_url
|
|
373
373
|
if (!videoUrl) throw new Error('任务完成但未返回视频 URL: ' + JSON.stringify(task))
|
|
374
374
|
|
|
375
375
|
if (output) {
|