Add preliminary(Torrent ID/name only) autcompletion to manage command

This commit is contained in:
Asmageddon 2012-05-29 16:16:58 +02:00
parent 1bc3c293fa
commit 314b6138d7
1 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,8 @@ from deluge.log import LOG as log
from optparse import make_option
import re
torrent_options = {
"max_download_speed": float,
"max_upload_speed": float,
@ -132,3 +134,7 @@ class Command(BaseCommand):
self.console.write("Setting %s to %s for torrents %s.." % (key, val, torrent_ids))
client.core.set_torrent_options(torrent_ids, {key: val}).addCallback(on_set_config)
return deferred
def complete(self, line):
# We use the ConsoleUI torrent tab complete method
return component.get("ConsoleUI").tab_complete_torrent(line)