pyrocore
pyrocore copied to clipboard
config: Add disk space check for any new item
See https://github.com/rakshasa/rtorrent/issues/727#issuecomment-394849757
- Use
d.free_diskspace
in agreater
check againstd.size_bytes
- Use
math.sub
if available to keep a reserved amount free - stop the item in its tracks (+ log that) if disk space is low, and set it to prio=0 (to avoid further auto-starts by other config or cron)
- there is a problem regarding other items that still fit, get started, and in sum eat up all disk space – so possibly force sychronized disk allocation when disk free gets near the reserved space (does
f.set_create_queued
help?) - test it with a
load.start
schedule, whether any space is claimed before the trigger fires
One of my pull req has the fix and command for d.disk_freespace
.
That's the one d.is_enough_diskspace
: https://github.com/rakshasa/rtorrent/pull/604
The problem was: "fix free_diskspace()
method in libtorrent
to report back proper size even if a download is stopped"