-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Remove torrent and delete data" does not work with vanilla rTorrent #654
Comments
maybe it's |
oh but ruTorrent does send a |
It's true, there is no vanilla rTorrent command for it afaik. Since ruTorrent is so ubiquitous we decided to implement it's command at some point, but yeah that won't work with Flood. And calling Flood can delete the files directly itself as it runs on the server itself; Transdroid can't do that. |
@bwitt Unfortunately #655 does not fix it. I found this in the rtorrent docs which explains better what a "tied file" is, it's if you have a watch directory that you drop torrents in, then the .torrent it "tied" to that entry, so calling This seems to be the general approach that needs to be taken: https://superuser.com/a/1580313 However I have not managed to figure out how to turn this into something that can be called via the XMLRPC API. I've been using the stock python client to experiment with this and it works great, all you need is something like this:
etc... |
Never mind, I figured it out! Here is how we can implement this over the API:
Downside is that this is a completely global setting. I am using the empty string as a target (based on the discussion in Sonarr/Sonarr@444fcf5 and rakshasa/rtorrent#227) but even when specifying the hash of a particular torrent, it seems to register the handler globally regardless. Therefore if you delete two torrents at the same time from two different clients, one with "delete data" enabled and the other without, it's possible that the data would get deleted for both. But this is kind of a stretch in terms of use cases... Note also that it seems recent rtorrent have Either way, this should be reasonable to port into Transdroid. @erickok would you be willing to implement this approach? |
I am not sure if we can call If we can this would functionally work perhaps, but it seems dangerous. At the very least this completely overrides any comment a user would have bound to that event himself. I don't know... it feels kinda hacky. Of course you can say the same of calling |
Yes you can, I am doing all this with the Python XMLRPC client. That's what the
Furthermore I tested a few more things, The only problem comes in if the user has a custom key tied to the |
Yes I was afraid of that. We'll have to try your solution. |
Thanks, can you re-open the issue since it's not resolved? |
Hi, thank you for this great app. I use rTorrent coupled with Flood for a web interface. Everything works in Transdroid except for "Remove torrent and delete data" - it just removes the torrent, but the data remains on disk.
After researching this, it looks like Flood calls
d.erase
but then directly deletes the data off the filesystem itself.Transdroid also calls
d.erase
but then instead setscustom5
to1
. I believe this is actually an ruTorrent-specific behavior and does not apply to vanilla rTorrent.ruTorrent seems to call
d.delete_tied
I think?What is the correct behavior here in order to make the "delete data" functionality work?
Thank you!
The text was updated successfully, but these errors were encountered: