2026-10-30 14:31:15 +08:00

17 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var previous=[];
engines.all().forEach(function(engine){
if(engine.id===engines.myEngine().id) return;
var source=String(engine.getSource());
if(!/(?:douyin-lite\.js|douyin-repair-resume[^/]*\.js)$/.test(source))
throw new Error('仍有其他脚本运行,不能同时操作手机:'+source);
previous.push(engine.id);engine.forceStop();
});
var deadline=Date.now()+5000;
while(engines.all().some(function(e){return previous.indexOf(e.id)>=0;})&&Date.now()<deadline)sleep(100);
if(engines.all().some(function(e){return previous.indexOf(e.id)>=0;}))throw new Error('旧抖音脚本未完全退出');
eval(files.read('/sdcard/脚本/抖音极速/douyin-lite.js').split('// MAIN:')[0]);
// 一次性迁移修复前的未完成现场;实机已确认今天仍为394/17880。
saveVideoCheckpoint(true,'修复前连续观看未完成:394/17880,恢复当前任务');
// 不传startStage,用正常启动路径验证持久状态能自动恢复视频阶段。
engines.execScriptFile('/sdcard/脚本/抖音极速/douyin-lite.js',{path:'/sdcard/脚本/抖音极速/'});