pyroscope / rtorrent-ps

:art: Extended rTorrent distribution with a fully customizable canvas and colors, other feature additions, and complete docs.
http://rtorrent-ps.readthedocs.io/
GNU General Public License v2.0
465 stars 43 forks source link

Add 'd.multicall.check.base_path' command #100

Open pyroscope opened 6 years ago

pyroscope commented 6 years ago

d.multicall.check.base_path fires event.download.orphaned when an item's data is gone. Obvious handlers are d.erase, or d.close and maybe also d.views.push_back_unique=orphaned.

Storing the gone base path in session state takes care of firing the event only once, and recovering when the path is fixed in cases where the data was only moved away, not deleted. For that case, a event.download.adopted event might be handy (e.g. scheduling a rehash as a handler).

A different route would be to implement the os.path.* command group, and then do all this in config via normal multicalls.

Also see https://github.com/rakshasa/rtorrent/pull/616