Opened 5 years ago

Last modified 5 years ago

#3217 new feature-request

deluge-console does not easily support alternative connections for interactive sessions

Reported by: nayfield Owned by:
Priority: minor Milestone: 2.x
Component: Console UI Version: develop
Keywords: Cc:

Description

when using deluge-console for non-default connections (different port/host, user/pass required) a common convention for non-interactive commands is to provide arguments such as:

$ deluge-console "connect 127.0.0.1:<altport> ; info ; quit"

However, there is no easy way to script an interactive console session for an alternative connection; it requires the user to type in the connect details after the console starts.

Currently, the following command connects but immediately exits:

$ deluge-console "connect 127.0.0.1<altport>"

This feature request is to act differently for the example command above. Specifically: when 'connect' is the only command provided in arguments, remain in interactive mode and connect as instructed. Do not change behavior for any other combination of arguments except single command argument.

Attachments (1)

deluge-conn.patch (1.4 KB) - added by nayfield 5 years ago.
Minimal patch to implement feature request

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by nayfield

Minimal patch to implement feature request

comment:1 Changed 5 years ago by nayfield

The attached patch (Against 1.3-stable) is a minimal implementation of this feature request.

It has been tested locally for a few use cases - no args, "connect <parameters>" , "connect; info ; quit", "info; quit".

As expected the only behavior change with the patch is in the requested feature of connect as the only arg.

If this is accepted, the code can be further optimized within the "if args:" block (including moving the help test up there). I did not do this to make the proposed change clear.

comment:2 Changed 5 years ago by int3l

  • Milestone changed from 1.3.16 to 2.x
  • Version changed from 1.3-stable to develop

Hi nayfield, can you please adjust this to the develop branch of Deluge. Also if you want to contribute, please create PR on GitHub? (There is a CI setup there with testing).

Thanks in advance!

Note: See TracTickets for help on using tickets.