flood
flood copied to clipboard
Remove folder when delete torrent and data
Type: Feature Request
Summary
Currently, when we delete data from a torrent (which is a folder), only the files in that folder are deleted. This leaves empty folders.
Idea of implementation
Delete/rimraf the root folder (if exist) when 'delete data' checked.
This comes from your rtorrent configuration file, not Flood. You should be able to perform what you want adding in your rtorrent.rc
file:
# Delete feature
method.insert = d.data_path, simple, "if=(d.is_multi_file), (cat,(d.directory),/), (cat,(d.directory),/,(d.name))"
method.set_key = event.download.erased,delete_erased,"execute=rm,-rf,--,$d.data_path="
This comes from your rtorrent configuration file, not Flood. You should be able to perform what you want adding in your
rtorrent.rc
file:# Delete feature method.insert = d.data_path, simple, "if=(d.is_multi_file), (cat,(d.directory),/), (cat,(d.directory),/,(d.name))" method.set_key = event.download.erased,delete_erased,"execute=rm,-rf,--,$d.data_path="
Big thanks, it works. But why is there no simpler configuration for common functionality (in rtorrent) ?
Haha, yeah, configuration is really powerful, but complex. Glad to hear it worked, you can close this issue :D
@DownloadHelper Be carefull, this method ALSO delete files even if you uncheck "delete data" under Flood. If you find the solution, let us know :)
I created a little docker container that monitor empty folders. Bind any local folder to /input
and all empty folders will be removed every 60
seconds. This setting is a variable and can be changed.