[Console] Add the torrent label to info command

Closes: https://dev.deluge-torrent.org/ticket/1556
Closes: https://github.com/deluge-torrent/deluge/pull/356
This commit is contained in:
kingamajick 2022-02-02 08:15:33 +00:00 committed by Calum Lind
parent 1089adb844
commit e8fd07e5e3
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3
1 changed files with 7 additions and 2 deletions

View File

@ -67,6 +67,7 @@ STATUS_KEYS = [
'total_payload_download',
'total_payload_upload',
'time_added',
'label',
]
# Add filter specific state to torrent states
@ -421,10 +422,14 @@ class Command(BaseCommand):
self.console.write(s)
s = '{!info!}Download Folder: {!input!}%s' % status['download_location']
self.console.write(s + '\n')
self.console.write(s)
if 'label' in status:
s = '{!info!}Label: {!input!}%s' % status['label']
self.console.write(s)
if detailed:
self.console.write('{!info!}Files in torrent')
self.console.write('\n{!info!}Files in torrent')
self.show_file_info(torrent_id, status)
self.console.write('{!info!}Connected peers')
self.show_peer_info(torrent_id, status)