#3549: deluge-console add not adding torrent filenames with embedded spaces
----------------------------+---------------------------------
Reporter: marcelpaulo | Type: bug
Status: new | Priority: minor
Milestone: needs verified | Component: Unknown
Version: 2.1.0 | Keywords: console add torrent
----------------------------+---------------------------------
Have just installed deluge 2.1.1 on Xubuntu 22.04 from the deluge-
team/stable PPA. Running deluged and would like to run deluge-console from
a .desktop file to add torrent files and magnet URLs. It works for magnet
URLs, for instance:
{{{
paulo@monk:~$ deluge-console add
'magnet:?xt=urn:btih:EC72BF82AB9381D0D6DEE0C3A88984AD7B62896A&tr=http%3A%2F%2Fbt4.t-ru.org%2Fann%3Fmagnet&dn=%5BTR24%5D%5BOF%5D%20Alfredo%20Rodriguez%20-%20The%20Invasion%20Parade%20-%202014%20(Jazz)'
Attempting to add torrent from magnet URI:
magnet:?xt=urn:btih:EC72BF82AB9381D0D6DEE0C3A88984AD7B62896A&tr=http%3A%2F%2Fbt4.t-ru.org%2Fann%3Fmagnet&dn=%5BTR24%5D%5BOF%5D%20Alfredo%20Rodriguez%20-%20The%20Invasion%20Parade%20-%202014%20(Jazz)
Torrent added!
<Deferred at 0x7f4388d8dea0 current result: None>
}}}
but it fails for torrent files with embedded spaces in the name, even if
properly quoted, for instance:
{{{
paulo@monk:~/Downloads$ deluge-console add Goodbye\ Solo\ \(2008\)\
\[720p\]\ \[BluRay\]\ \[YTS.MX\].torrent
usage: deluge-console [-h] [-V] [-c <config>] [-l <logfile>] [-L <level>]
[--logrotate [<max-size>]] [-q] [--profile
[<profile-file>]]
[-d <ip_addr>] [-p <port>] [-U <user>] [-P <pass>]
Command ...
deluge-console: error: argument Command: invalid choice: 'Goodbye' (choose
from 'add', 'cache', 'config', 'connect', 'debug', 'del', 'exit', 'gui',
'halt', 'help', 'info', 'manage', 'move', 'pause', 'plugin', 'quit',
'reannounce', 'recheck', 'resume', 'rm', 'status', 'update_tracker')
}}}
In this case, bash passes 2 arguments to deluge-console: 'add' and the
torrent filename. But deluge-console seems too be further word splitting
the filename on blanks.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3549>
Deluge <https://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/deluge-dev/050.ef90e9951fc63ca2e1adfd66b03982c6%40deluge-torrent.org.