crazy-max / docker-rtorrent-rutorrent

rTorrent and ruTorrent Docker image
MIT License
460 stars 103 forks source link

[BUG] Delete Torrent or Delete Torrent & Data #199

Closed XxAcielxX closed 1 year ago

XxAcielxX commented 1 year ago

Hello,

While working on my version of this image, I noticed that the two mentioned options are broken.

By default with your container: Delete Torrent = Deletes both Torrent + Data ❌ Delete Torrent & Data = Deletes both Torrent + Data ✅

After uncommenting this line as:

# Erase data when torrent deleted (no need erasedata plugin on ruTorrent)
#method.set_key = event.download.erased,delete_erased,"execute=rm,-rf,--,$d.data_path="

After the fix: Delete Torrent = Deletes Data (works as intended) ✅ Delete Torrent & Data = Deletes Torrent only (Data do not get deleted) ❌

I have used the original rTorrent+ruTorrent in the past and both the options worked as they should, and was working in your old image version as well.

Kindly find out what really is causing this issue.

Regards, XxAcielxX

XxAcielxX commented 1 year ago

After uncommenting this line as:

# Erase data when torrent deleted (no need erasedata plugin on ruTorrent)
#method.set_key = event.download.erased,delete_erased,"execute=rm,-rf,--,$d.data_path="

Can you look into my other PR as well. I have tested this myself without these lines and it works as intended. This method.set_key was need in the old version and is unnecessary now.

This deletes data as well even when a Ratio Plugin (or any other plugin) remove a torrent only.

ghoto commented 1 year ago

Please look into @XxAcielxX PR

ghoto commented 1 year ago

@XxAcielxX Hey I found this https://github.com/Novik/ruTorrent/issues/2215#issuecomment-957351383 and it works. It solves the remove torrent, and remove torrent + data

This is how my .rtorrent.rc looks like now

# Erase data when torrent deleted (no need erasedata plugin on ruTorrent)
#method.set_key = event.download.erased,delete_erased,"execute=rm,-rf,--,$d.data_path="
method.set_key=event.download.finished,cross_seed,"execute={/var/services/homes/elghoto/docker/pirate-hole/rutorrent-config/rtorrent/rtorrent-cross-seed.sh,$d.name=}"

# Load plugins to solve remove issue
schedule2 = init_plugins, 10, 0, "execute2 = {sh,-c, /usr/bin/php /var/www/ruTorrent/php/initplugins.php rtorrent  &}"