Re: Trackers are not added through magnets.
Posted: Fri Jul 01, 2022 6:42 pm
I narrowed it down to commit 2bd095e specifically being the culprit and submitted bug-ticket here: https://dev.deluge-torrent.org/ticket/3530#ticket
Thanks again nemonein and Spire
Edit: I updated ticket with a fix for issue. Can be applied locally if wanted through e.g.:
Edit: The fix above is deprecated, and should be changed to using 'lt.parse_magnet_uri()' to generate 'add_torrent_params', though that is already used in the offending commit, and i'm not sure where to otherwise 'strip().encode()' frankly - i'll leave that to the people actually knowing what they are doing lol
Anyway, the fix works for time being atleast.
Edit2: Last note, it's not the 'strip().encode()' making it work, but just mere addition of the 'add_torrent_params['url'] = magnet'. In libtorrent v2 docs it's stated to be removed in v2, though isn't here on v2.0.6 where still fixes issue. Also, 'lt.parse_magnet_uri()' I said was used before in offending commit, but was only used in the prefetching I see now, but cannot myself make it work in next part as doesn't play nice with rest code there for me.
Thanks again nemonein and Spire

Edit: I updated ticket with a fix for issue. Can be applied locally if wanted through e.g.:
Code: Select all
sudo find /usr -path *deluge/core/torrentmanager.py -exec sed -i "s/if magnet_info:/if magnet_info:\n add_torrent_params['url'] = magnet.strip().encode()/" {} \;

Edit2: Last note, it's not the 'strip().encode()' making it work, but just mere addition of the 'add_torrent_params['url'] = magnet'. In libtorrent v2 docs it's stated to be removed in v2, though isn't here on v2.0.6 where still fixes issue. Also, 'lt.parse_magnet_uri()' I said was used before in offending commit, but was only used in the prefetching I see now, but cannot myself make it work in next part as doesn't play nice with rest code there for me.