Vertex HDSky天空站暂停1小时再开车脚本
需在Vertex中设置添加时暂停种子。
修改clientIds
为你自己的下载器ID
在Vertex-定时脚本
中填入
async () => {
const clientIds = [
'5d75bb6c', 'a096f383', '05d8d260', '65cc92fa', '4f8ec4ee',
'5efd49c5', '7f696b66', '41a13262', '0178f689', 'bf48d26d',
'f0f0a324', '51fb4a5b', 'c06a729b', 'c28b3b68'
];
const pauseTime = 60 * 60;
const categoryName = 'HDSKY'; // 要处理的分类名称
for (const clientId of clientIds) {
const client = global.runningClient[clientId];
if (!client || !client.status) continue;
const torrents = client.maindata.torrents;
for (const torrent of torrents) {
if (!torrent) continue;
if (torrent.category !== categoryName) continue;
const downloadTime = Math.floor(Date.now() / 1000 - torrent.addedTime);
if (torrent.state === 'pausedDL') {
if (downloadTime > pauseTime) {
await client.resumeTorrent(torrent.hash);
logger.sc(`下载器:[${client.alias}] \n分类:[${torrent.category}] ${categoryName}种子已到达${Math.floor(pauseTime/60)}分钟,执行开始任务\n当前已下载时间: ${Math.floor(downloadTime/60)}分钟\n种子名:${torrent.name}`);
}
}
}
}
};
其他文章