transdroid icon indicating copy to clipboard operation
transdroid copied to clipboard

magnet link space handling

Open Bijiont opened this issue 3 years ago • 9 comments

Clicking magnet links from websites any %20 in the filename are ignored resulting in torrent filename with no spaces in Qbittorrent. Behavior only happens from web, clicking the item from Transdroid search doesn't produce the issue.

Example: magnet:?xt=urn:btih:XWONC453ILPKFUTYPR7JRQYH3IGK5YAB&dn=%5BSubsPlease%5D%20Made%20in%20Abyss%20-%20Retsujitsu%20no%20Ougonkyou%20-%2001%20%28720p%29%20%5BD21BAA11%5D.mkv&xl=209942958&tr=http%3A%2F%2Fnyaa.tracker.wf%3A7777%2Fannounce&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2F9.rarbg.to%3A2710%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.cyberia.is%3A6969%2Fannounce&tr=udp%3A%2F%2Fexodus.desync.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker3.itzmx.com%3A6961%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&tr=udp%3A%2F%2Ftracker.tiny-vps.com%3A6969%2Fannounce&tr=udp%3A%2F%2Fretracker.lanta-net.ru%3A2710%2Fannounce&tr=http%3A%2F%2Fopen.acgnxtracker.com%3A80%2Fannounce&tr=wss%3A%2F%2Ftracker.openwebtorrent.com

Qbittorrent 4.4.3.1 on Windows 10. Transdroid configured with Windows OS in optional.

Bijiont avatar Aug 05 '22 17:08 Bijiont

In my experience it's just the title that doesn't have spaces; the actual file inside which is being written to has spaces. Is that how it is for you? or does the actual file on disk not have spaces?

qBittorrent 4.3.9 on Linux

bwitt avatar Nov 06 '22 22:11 bwitt

It appears to be stripping the whitespace here: https://github.com/erickok/transdroid/blob/aadddd0d3ac926bb376e956e2d2451f7d91ff638/app/src/main/java/org/transdroid/daemon/task/AddByMagnetUrlTask.java#L35

bwitt avatar Nov 06 '22 22:11 bwitt

Was added here https://github.com/erickok/transdroid/pull/551

bwitt avatar Nov 06 '22 22:11 bwitt

~maybe we could replace only (actual space) instead of \\s (any whitespace chars including %20)~ no that doesn't work

bwitt avatar Nov 06 '22 22:11 bwitt

In my experience it's just the title that doesn't have spaces; the actual file inside which is being written to has spaces. Is that how it is for you? or does the actual file on disk not have spaces?

qBittorrent 4.3.9 on Linux

That is correct, the spaces only appear in QB under the "Name" section. I am not sure if this is the same as Title as mentioned.

I understand this may fall into "can't please everyone", I didn't see it was something added.

Bijiont avatar Nov 06 '22 22:11 Bijiont

Do magnet links always need %20 for space or is it somehow possible for them to have literal spaces in them?

bwitt avatar Nov 07 '22 04:11 bwitt

Do magnet links always need %20 for space or is it somehow possible for them to have literal spaces in them?

Unsure, all magnet links I have used all contain %20 for spaces.

Bijiont avatar Nov 07 '22 04:11 Bijiont

%20 Should be Space and it's remove

Please Fix This...

MyGitHub5 avatar Nov 09 '22 02:11 MyGitHub5

Up

MyGitHub5 avatar Dec 08 '23 13:12 MyGitHub5