乐享奈飞 乐享奈飞

乐享奈飞-乐享无限,共享自由。

目录
删种规则
/  

删种规则

根据自身盒子io情况刷的站点,勾选删种和修改里面的参数,不要直接套用。

1.黑车

1.1黑车1

(maindata, torrent) => {
  const categoryList = ["keep"];
  let ruleData = [
    { down: 10, up: 2 },
    { down: 5, up: 1 },
  ];
  const { state, category, uploadSpeed, downloadSpeed } = torrent;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  for (const rule of ruleData) {
    if (
      state == "downloading" &&
      downloadSpeed >= util.calSize(rule.down, "MiB") &&
      uploadSpeed <= util.calSize(rule.up, "MiB")
    ) {
      return true;
    }
  }

  return false;
};

1.2黑车2

(maindata, torrent) => {
  const categoryList = ["keep"];
  const { state, category, uploadSpeed, downloadSpeed } = torrent;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (
    state == "downloading" &&
    downloadSpeed >= util.calSize(10, "MiB") &&
    downloadSpeed / uploadSpeed >= 1.8
  ) {
    return true;
  }

  return false;
};

第一版的黑车是通过写死的keyvalue然后for循环去取里面的数值,简单粗暴,但是在2.5g管以及10g管的情况下,判断就用不上了,维护成本过高。第二版的黑车主要思路是,下载速度除上传速度当大于1.8这区间的时候进行删种。分成写两个的原因是黑车1是针对刚开始发车追车时候判断的,避免一开始下载10上传5这种被误删。

2.无效做种

(maindata, torrent) => {
  const categoryList = ["keep"];
  const stateList = ["uploading", "stalledUP"];
  const { state, uploadSpeed, category, completedTime } = torrent;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (
    stateList.indexOf(state) !== -1 &&
    uploadSpeed <= util.calSize(512, "KiB") &&
    moment().unix() - completedTime >= 5400
  ) {
    return true;
  }

  return false;
};

无效做种是针对做种超过一个半小时的时候,并且上传小于512kb的种子。如果下载或者做种的种子本身过多,可以进行修改。

3.分享率

(maindata, torrent) => {
  const categoryList = [
    "keep",
    "chdbits",
    "ourbits",
    "hdhome",
    "lemonhd",
    "pter",
    "audiences",
    "hdchina",
    "hdsky",
    "hddolby",
  ];
  const { uploaded, size, category } = torrent;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (uploaded / size >= 3) {
    return true;
  }

  return false;
};

分享率就是3倍跳车,具体要改什么站点,就按格式改categoryList里的参数即可,每个人根据站点以及vip情况自行修改。

4.最长下载时间

(maindata, torrent) => {
  const categoryList = ["keep"];
  const stateList = ["downloading", "stalledDL"];
  const { state, addedTime, category, uploadSpeed } = torrent;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (
    stateList.indexOf(state) !== -1 &&
    moment().unix() - addedTime >= 57600 &&
    uploadSpeed <= util.calSize(5, "MiB")
  ) {
    return true;
  }

  return false;
};

针对那些16个小时内没有下完的龟速种子,大部分情况下都是发种人盒子崩了什么的。上传速度如果大于5m的,不删除。

5.慢车 持续时间40s

(maindata, torrent) => {
  const categoryList = ["keep"];
  const stateList = ["downloading", "stalledDL"];
  const { state, uploadSpeed, progress, category, leecher } = torrent;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (
    (moment().hour() >= 0 && moment().hour() <= 8) ||
    maindata.leechingCount <= 10 ||
    leecher >= 100
  ) {
    return false;
  }
  if (
    stateList.indexOf(state) !== -1 &&
    uploadSpeed <= util.calSize(250, "KiB") &&
    progress >= 0.1
  ) {
    return true;
  }

  return false;
};

1.在0点-8点这个时间段,种子数量小于10个时跳过,下载人数大于100时跳过,保证夜间不误删,能有足够的种子。
2.进度大于10%,上传速度小于250kb持续40的跳车。

6.长时间未开始

(maindata, torrent) => {
  const categoryList = ["keep"];
  const { state, category, progress, addedTime } = torrent;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (
    moment().hour() >= 0 &&
    moment().hour() <= 8 &&
    state == "stalledDL" &&
    progress <= 0.05 &&
    moment().unix() - addedTime >= 18000
  ) {
    return true;
  }
  if (
    state == "stalledDL" &&
    progress <= 0.05 &&
    moment().unix() - addedTime >= 14400
  ) {
    return true;
  }

  return false;
};

1.删除0-8点这个时间段,超过五小时并且进度小于5%的种子。
2.删除常规时间段,超过四小时并且进度小于5%的种子。

7.下载人数少

(maindata, torrent) => {
  const categoryList = ["keep"];
  const stateList = ["downloading", "stalledDL"];
  const { state, category, leecher, uploadSpeed, addedTime } = torrent;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (
    stateList.indexOf(state) !== -1 &&
    leecher <= 10 &&
    uploadSpeed <= util.calSize(500, "KiB") &&
    moment().unix() - addedTime >= 900
  ) {
    return true;
  }

  return false;
};

删除下载人数小于10,上传速度低于500kb,添加超过20分钟的非潜力种。

8.空1小时跳车

持续时间10-15s

(maindata, torrent) => {
  const categoryList = ["keep"];
  const { state, category, progress } = torrent;
  const { eta } = torrent.originProp;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (state == "downloading" && category == 'hdsky' && progress >= 0.05 && progress <= 0.2 && (eta / 60) <= 70) {
    return true;
  }

  return false;
};

9.瓷器非免跳车

qb的分类必须和下方的判断一致。默认使用hdchina

(maindata, torrent) => {
  const categoryList = ["keep"];
  const { state, category, addedTime } = torrent;
  const { num_incomplete } = torrent.originProp;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (state == 'downloading' && category == 'hdchina' && moment().unix() - addedTime >= 180 && num_incomplete <= 12) {
    return true;
  }

  return false;
};

10.岛非免跳车

qb的分类必须和下方的判断一致。默认使用chdbits

(maindata, torrent) => {
  const categoryList = ["keep"];
  const { state, category, addedTime } = torrent;
  const { num_incomplete } = torrent.originProp;
  if (categoryList.indexOf(category) !== -1) {
    return false;
  }
  if (state == 'downloading' && category == 'chdbits' && moment().unix() - addedTime >= 180 && num_incomplete <= 40) {
    return true;
  }

  return false;
};

标题:删种规则
作者:Dragon
地址:https://so.98hg.top/articles/2022/10/10/1665381568644.html