Giter Club home page Giter Club logo

Comments (15)

sununs avatar sununs commented on May 23, 2024

每天来看一次,期待作者更新~

from autoremove-torrents.

sununs avatar sununs commented on May 23, 2024

感谢大佬更新,remove-inactive-seeds部分测试2天,工作正常

from autoremove-torrents.

jerrymakesjelly avatar jerrymakesjelly commented on May 23, 2024

感谢测试 😄 有问题请随时告知

如果没问题,很快我就会把这个功能合并到主分支中

from autoremove-torrents.

sununs avatar sununs commented on May 23, 2024

感谢测试 😄 有问题请随时告知

如果没问题,很快我就会把这个功能合并到主分支中

大佬,整理一下我的问题
①1.4.9包含last_activity吗?我使用直接报错了。
②remove-inactive-seeds是尽量删除时间最长的”最后活动“种子吗,我测试感觉好像是删除随机的非活动种子?

附上我的config:
微信截图_20200131062527

from autoremove-torrents.

jerrymakesjelly avatar jerrymakesjelly commented on May 23, 2024

@sununs 感谢您的支持和细心测试

①1.4.9包含last_activity吗?我使用直接报错了。

不包含,1.4.9只添加了剩余空间的这一个功能,这个分支由于涉及到架构的一点点变动所以还没合并

②remove-inactive-seeds是尽量删除时间最长的”最后活动“种子吗,我测试感觉好像是删除随机的非活动种子?

在删除的过程中,程序会按活动时间对种子进行排序,不过由于所用的删除策略的不同,AMT并不总是按照活动顺序去删除种子的

对于maximum_number,它直接取最不活跃的几个种子,这个就完全按照顺序去取了

if self._max_limit == 0:
self.remove = torrents
elif self._max_limit < len(torrents):
self.remove = set(torrents[0:len(torrents)-self._max_limit])
self.remain = set(torrents[len(torrents)-self._max_limit:])
else:
self.remain = torrents

但对于seed_size,它在删除的时候还会考虑种子的大小,具体做法是先按活跃时间从近到远排列,然后依次挑选种子,当满足 这个种子的体积+已挑选种子的体积 < 设置的大小 这个条件时,这个种子才会被挑选并保留(因为留下来的话就超过限制了);否则它就会被删除,即使它确实比后面的种子更活跃一些

for torrent in torrents:
if size_sum+torrent.size < self._limit:
size_sum += torrent.size
self.remain.add(torrent)
else:
self.remove.add(torrent)

对于后面要在 free_space 中添加的 remove-active-seedsremove-inactive-seeds 也是如此
这也是为什么在描述中会写尽量删除活跃/不活跃种子的原因

from autoremove-torrents.

sununs avatar sununs commented on May 23, 2024

@jerrymakesjelly 感谢大佬百忙中的回复。
假如种子按活跃时间从近到远排列分别为2G,3G,1G,如果seed_size设置4G
我以为:保留2G种子,删除3G和1G的种子。
大佬的意思是:保留2G和1G的种子,删除3G的种子?

from autoremove-torrents.

jerrymakesjelly avatar jerrymakesjelly commented on May 23, 2024

大佬的意思是:保留2G和1G的种子,删除3G的种子?

@sununs 对的,就是这个意思 🐶 毕竟留下1G的种子也没有超出限制
其实是一个贪心算法

from autoremove-torrents.

sununs avatar sununs commented on May 23, 2024

大佬的意思是:保留2G和1G的种子,删除3G的种子?

@sununs 对的,就是这个意思 🐶 毕竟留下1G的种子也没有超出限制
其实是一个贪心算法
@jerrymakesjelly 这个算法优点很明显,每次处理后都更贴近设置的大小。
我测试中发现有个小小的问题,就是大量活跃时间很远的小种子,多次处理后仍会保留下来。

from autoremove-torrents.

sununs avatar sununs commented on May 23, 2024

@jerrymakesjelly 大佬,我把种子按照“最后活动”做了一个递减排序:1#种子为4天21小时前;306#种子为1分钟前。使用“remove-inactive-seeds”动作,我理解为应该尽量删除排序靠前的种子。实际测试为:
第一次删除为 43#,298#
第二此删除为 126#,132#,218#,227#,279#
第三次删除为 39#,217#,257#,275#
回头大佬给看看,谢谢了!

from autoremove-torrents.

jerrymakesjelly avatar jerrymakesjelly commented on May 23, 2024

@sunsuns 感谢你的细心测试,请问你用的是哪个条件呢?maximum_numberseed_size还是free_space?另外BT客户端的版本可不可以也提供一下

我在issue42分支中构建了一个非贪婪删除的版本,在这个版本里面的种子应该就是严格按照顺序删除的,如果可以的话你可以测试一下,不过需要手动安装:

git clone https://github.com/jerrymakesjelly/autoremove-torrents
git checkout issue42
python3 setup.py install

卸载的时候仍然可以使用pip卸载

from autoremove-torrents.

sununs avatar sununs commented on May 23, 2024

@jerrymakesjelly 已测试issue42分支完全正常,测试环境: qbittorrent4.2.1,free_space,remove-inactive-seeds,大佬辛苦了!

from autoremove-torrents.

jerrymakesjelly avatar jerrymakesjelly commented on May 23, 2024

@sununs 感谢测试,下一个版本我会添加一个是否启用贪婪模式的开关,满足用户的更多样化的需求

from autoremove-torrents.

sununs avatar sununs commented on May 23, 2024

这个主意不错,等新版本。:)

from autoremove-torrents.

ceozero avatar ceozero commented on May 23, 2024

remove-inactive-seeds 可以判断超过多少天前的种子吗。HR不够的也不活动的种子经常被删掉。
比如 remove-inactive-seeds 只删除做种超过5天并且不活动的种子。

from autoremove-torrents.

jerrymakesjelly avatar jerrymakesjelly commented on May 23, 2024

remove-inactive-seeds 可以判断超过多少天前的种子吗。HR不够的也不活动的种子经常被删掉。
比如 remove-inactive-seeds 只删除做种超过5天并且不活动的种子。

这个功能需要一个 if 表达式的机制,这个功能在未来会添加

from autoremove-torrents.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.