Documentation
¶
Overview ¶
实验性功能:动态保种。 自动从站点下载亟需保种(做种人数 < 10)的种子并做种。用户自行设置每个站点的总保种体积上限。 默认仅会下载免费的并且没有 HnR 的种子。 当前保种的种子如果没有断种风险(做种人数充足),会在需要时自动删除以腾出空间下载新的(亟需保种)种子。 使用方法:在 ptoo.toml 站点配置里增加 "dynamicSeedingSize = 100GiB" 设置总保种体积上限, 然后定时运行 ptool dynamicseeding <client> <site> 即可。 动态保种添加的种子会放到 dynamic-seeding-<site> 分类里并且打上 site:<site> 标签。 用户也可以将手工下载的该站点种子放到该分类里(也需要打上 site:<site> 标签)以让动态保种管理。 @todo : 动态保种种子的辅种,有辅种的种子删除时保留文件。
Index ¶
Constants ¶
const IGNORE_FILE_SIZE = 100
const INACTIVITY_TIMESPAN = 3600 * 3 // If incomplete torrent has no activity for enough time, abort.
const MAX_PARALLEL_DOWNLOAD = 3
const MAX_SCANNED_TORRENTS = 1000
const MAX_SEEDERS = 10
site torrent which current seeders >= MAX_SEEDERS will NOT be added; client torrent which current seeders (including self client) > MAX_SEEDERS could be safely deleted.
const MIN_FREE_REMAINING_TIME = 3600 * 3
const MIN_REPLACE_SEEDERS_DIFF = 3
Could replace a client seeding torrent with a new site torrent if their seeders diff >= this
const MIN_SEEDERS = 3
client torrent which current seeders <= MIN_SEEDERS will NEVER be deleted. client torrent that MIN_SEEDERS < current seeders <= MAX_SEEDERS may be deleted sometimes.
const MIN_SEEDING_TIME = 86400 * 10 // completed torrent will NOT be deleted during this time span. 10d
const MIN_SIZE = 10 * 1024 * 1024 * 1024 // minimal dynamicSeedingSize required. 10GiB
client torrent params
const MIN_TORRENT_AGE = 86400 * 15 // site torrent must be published before this time ago
site torrent params
const NEW_TORRENT_TIMESPAN = 3600
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type TrackersStatus ¶
type TrackersStatus int
const ( TRACKER_UNKNOWN TrackersStatus = iota TRACKER_OK TRACKER_INVALID )