rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.05k stars 412 forks source link

Labels with slashes and spaces are URL-encoded #1174

Closed Jolly-Pirate closed 1 year ago

Jolly-Pirate commented 1 year ago

Here's a little test to demonstrate the problem in rtorrent 0.9.8: Added this to the rtorrent.rc, to send the label ($d.custom1=) to a shell script to log it in a text file, after rehashing a torrent method.set_key = event.download.hash_done,whatever,"execute2={/myscript.sh,$d.custom1=}"

If the label contains a path, i.e. label with sublabels, or if it contains white spaces, those characters are URL encoded!

For example,

ruTorrent v3-10 7-31-2022 7-22-46 PM

This is a big problem because I'm configuring the .rc file to move folders based on the label and sublabels, but the resulting folders contain the URL-encoded strings and do not respect the proper path creation with subfolders.

kannibalox commented 1 year ago

This is not an issue with rTorrent, it's simply how ruTorrent stores the fields. Here's some more info from a previous ticket: https://github.com/rakshasa/rtorrent/issues/1050#issuecomment-1140436216

Jolly-Pirate commented 1 year ago

Thanks for input @kannibalox it helped me figure a way to fix it. Here it is https://github.com/Jolly-Pirate/rtorrent-snippets/tree/master/fix-urlencoded-label