MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / doVideo

Method doVideo

wxapp/mimengshenghuo.js:342–357  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

340 }
341
342 async doVideo() {
343 if (!this.videoTask) return ["未找到视频任务"];
344 const total = Number(this.videoTask.activity?.cycle_quota || 0);
345 const progress = Number(this.videoTask.progress || 0);
346 const remaining = Math.max(0, total - progress);
347 if (!remaining) return ["视频任务今日已完成"];
348
349 const limit = Number(process.env.mimeng_video_times || remaining);
350 const times = Math.max(0, Math.min(remaining, Number.isFinite(limit) ? limit : remaining));
351 const results = [];
352 for (let i = 0; i < times; i++) {
353 results.push(await this.activityPush(this.videoTask.activity.id, `视频任务[${i + 1}/${times}]`));
354 await $.wait(1200);
355 }
356 return results;
357 }
358
359 async run() {
360 await this.login();

Callers 1

runMethod · 0.95

Calls 2

activityPushMethod · 0.95
waitMethod · 0.45

Tested by

no test coverage detected