mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +00:00
added 'all' subcommand to resume and pause, moved share ratio to general info view
This commit is contained in:
parent
a27b0c6329
commit
e32ce5b265
@ -74,13 +74,13 @@ class Command(BaseCommand):
|
||||
print templates.info_transfers("Download Speed", common.fspeed(state['download_payload_rate']))
|
||||
if state['state'] in ('Downloading', 'Seeding'):
|
||||
print templates.info_transfers("Upload Speed", common.fspeed(state['upload_payload_rate']))
|
||||
print templates.info_transfers("Share Ratio", "%.1f" % state['ratio'])
|
||||
if state['state'] == ('Downloading'):
|
||||
print templates.info_transfers("ETA", common.ftime(state['eta']))
|
||||
|
||||
if verbose:
|
||||
print templates.info_network("Seeders", "%s (%s)" % (state['num_seeds'], state['total_seeds']))
|
||||
print templates.info_network("Peers", "%s (%s)" % (state['num_peers'], state['total_peers']))
|
||||
print templates.info_network("Share Ratio", "%.1f" % state['ratio'])
|
||||
print templates.info_network("Availability", "%.1f" % state['distributed_copies'])
|
||||
print templates.info_files_header("Files")
|
||||
for i, file in enumerate(state['files']):
|
||||
|
@ -6,8 +6,13 @@ from deluge.ui.null2.colors import templates, default_style as style
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""Pause a torrent"""
|
||||
usage = "Usage: pause <torrent-id> [<torrent-id> ...]"
|
||||
usage = "Usage: pause [ all | <torrent-id> [<torrent-id> ...] ]"
|
||||
def handle(self, *args, **options):
|
||||
if len(args) == 0:
|
||||
print self.usage
|
||||
return
|
||||
if len(args) == 1 and args[0] == 'all':
|
||||
args = tuple() # empty tuple means everything
|
||||
try:
|
||||
args = mapping.to_ids(args)
|
||||
torrents = match_torrents(args)
|
||||
|
@ -6,8 +6,13 @@ from deluge.ui.null2.colors import templates, default_style as style
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""Resume a torrent"""
|
||||
usage = "Usage: resume <torrent-id> [<torrent-id> ...]"
|
||||
usage = "Usage: resume [ all | <torrent-id> [<torrent-id> ...] ]"
|
||||
def handle(self, *args, **options):
|
||||
if len(args) == 0:
|
||||
print self.usage
|
||||
return
|
||||
if len(args) == 1 and args[0] == 'all':
|
||||
args = tuple() # empty tuple means everything
|
||||
try:
|
||||
args = mapping.to_ids(args)
|
||||
torrents = match_torrents(args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user