styxit / HTPC-Manager

A fully responsive interface to manage all your favorite software on your Htpc.
http://htpc.io
MIT License
529 stars 183 forks source link

Deluge: "Remove Torrent" does a "Remove With Data" instead #261

Closed MartinAyla closed 10 years ago

MartinAyla commented 10 years ago

I'm using the latest git release.

I just had a finished torrent in the deluge module, and when I clicked on "Remove Torrent" it did a "Remove With Data" instead, and deleted the downloaded file :(

Hellowlol commented 10 years ago

Are you pressed the correct button? According to deluge docs the this should be correct. Can you reproduce the error?

MartinAyla commented 10 years ago

Sorry for the late reply, was on vacation.

Yes, I pressed the correct button, and I just tried again - "Remove Torrent" deletes the torrent(!), so it's reproducible.

Hellowlol commented 10 years ago

Well remove torrent should remove torrent. And remove torrent with data should delete the file and the torrent. I don't use deluge but I'll see if I can't fix it.

MartinAyla commented 10 years ago

OK, thanks :)

The first time it happened I lost a 30 GB download :/

Hellowlol commented 10 years ago

That's bad. Especially if the user a slow connection or download caps.

Den 24. juli 2014 kl. 17:13 skrev MartinAyla notifications@github.com:

OK, thanks :)

The first time it happened I lost a 30 GB download :/

— Reply to this email directly or view it on GitHub.

Hellowlol commented 10 years ago

The error is in the python code,

@cherrypy.expose() @cherrypy.tools.json_out() def remove(self, torrentId, removeData): removeDataBool = bool(removeData); return self.fetch('core.remove_torrent', [torrentId,removeDataBool])

Should be: @cherrypy.expose() @cherrypy.tools.json_out() def remove(self, torrentId, removeData): removeDataBool = bool(int(removeData)); return self.fetch('core.remove_torrent', [torrentId,removeDataBool])

Because bool('randomstring') is True

MartinAyla commented 10 years ago

Great that you found it!

Will the fix be in the next update?

styxit commented 10 years ago

The fix will be in an update if someone makes the required commits. Don't know when.