lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.1k stars 161 forks source link

lftp torrent set variables are missing #614

Open ChrisCheney opened 3 years ago

ChrisCheney commented 3 years ago

When trying to download torrents using lftp-4.9.2-1.fc33.x86_64 on Fedora 33 I get the following error:

lftp -c "set ssl:verify-certificate no; set torrent:stop-on-ratio 0; set torrent:seed-max-time 0; torrent https://files.kde.org/neon/images/user/20201203-0947/neon-user-20201203-0947.iso.torrent"
torrent:stop-on-ratio: no such variable. Use `set -a' to look at all variables.
torrent:seed-max-time: no such variable. Use `set -a' to look at all variables.
neon-user-20201203-0947.iso: Validation: 4569/6480 (70%) 545.56M/s eta:1s    

Running 'set -a' shows no torrent related variables.

set ssl:use-sni yes
set ssl:verify-certificate yes
set xfer:auto-rename no
set xfer:backup-suffix ~%Y%m%d%H%M%S~
lavv17 commented 3 years ago

Add “module cmd-torrent” command at the beginning.

On Wed, 9 Dec 2020 at 05:08, Chris Cheney notifications@github.com wrote:

When trying to download torrents using lftp-4.9.2-1.fc33.x86_64 on Fedora 33 I get the following error:

lftp -c "set ssl:verify-certificate no; set torrent:stop-on-ratio 0; set torrent:seed-max-time 0; torrent https://files.kde.org/neon/images/user/20201203-0947/neon-user-20201203-0947.iso.torrent" torrent:stop-on-ratio: no such variable. Use set -a' to look at all variables. torrent:seed-max-time: no such variable. Useset -a' to look at all variables. neon-user-20201203-0947.iso: Validation: 4569/6480 (70%) 545.56M/s eta:1s

Running 'set -a' shows no torrent related variables.

set ssl:use-sni yes set ssl:verify-certificate yes set xfer:auto-rename no set xfer:backup-suffix ~%Y%m%d%H%M%S~

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/614, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXF3QMIIOHGON7CBZNTST3L3VANCNFSM4USZ45HA .

-- Alexander.

ChrisCheney commented 3 years ago

Thanks that worked. 👍

The lftp torrent feature appears to mostly work without using the module command so then appears buggy as noted earlier, so the discoverability of needing to use module could be improved.

Maybe when using the torrent command have lftp mention that its module should be loaded if it wasn't?

It might also be helpful to add to the lftp man page when you need to use the module command. While the man page does cover both 'torrent' and 'module' commands it doesn't mention that the torrent command needs the command module cmd-torrent. It looks like this might also apply to the 'mirror' and 'sleep' commands as well.

Thanks! Chris

lavv17 commented 3 years ago

You are correct, it’s a misfeature that settings are only available after loading the module. The command “torrent” itself triggers automatic module loading.

On Thu, 17 Dec 2020 at 02:04, Chris Cheney notifications@github.com wrote:

Thanks that worked. 👍

The lftp torrent feature appears to mostly work without using the module command so then appears buggy as noted earlier, so the discoverability of needing to use module could be improved.

Maybe when using the torrent command have lftp mention that its module should be loaded if it wasn't?

It might also be helpful to add to the lftp man page when you need to use the module command. While the man page does cover both 'torrent' and 'module' commands it doesn't mention that the torrent command needs the command module cmd-torrent. It looks like this might also apply to the 'mirror' and 'sleep' commands as well.

Thanks! Chris

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/614#issuecomment-747093592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXBT2C6CLCE2WNEWJTDSVE4HRANCNFSM4USZ45HA .

-- Alexander.