Opened 14 years ago

Closed 14 years ago

#1856 closed patch (Fixed)

deluge-console: Add option to sort items in "info" command

Reported by: eirikba Owned by: Calum
Priority: minor Milestone: 1.3.2
Component: Console UI Version: 1.3-stable
Keywords: Cc:

Description

This patch adds a --sort option to the "info" command of deluge-console. This option decides which order to display the torrents.

Attachments (2)

Change History (7)

comment:1 by andar, 14 years ago

Instead of using the _rev suffix, I would suggest you change this to include a --sort-reverse option instead and factor the code accordingly.

Also, you can remove the line:

keys = [ k for k in status.keys() ]

Unless I'm missing some sort of point to this?

comment:2 by eirikba, 14 years ago

Yes, --sort-reverse sounds better. Will do.

The 'keys' array is what I use for sorting. But I guess it is better to use the 'sorted' function (on status.items()). I'll try that.

comment:3 by eirikba, 14 years ago

A side effect of this updated patch is that the list is now always sorted (by default on name). I think that may be a feature :)

comment:4 by Calum, 14 years ago

Owner: set to Calum
Status: newaccepted

comment:5 by Calum, 14 years ago

Component: otherconsole
Milestone: Future1.3.2
Resolution: fixed
Status: acceptedclosed

Added to 1.3-stable a549eac

Note: See TracTickets for help on using tickets.