From d9d8762c8ea67ec300946894303715b8ea9f644d Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 21 Feb 2011 17:41:28 +0100 Subject: [PATCH] add get_torrent_name --- deluge/ui/console/main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py index cdfb35242..e7c743245 100644 --- a/deluge/ui/console/main.py +++ b/deluge/ui/console/main.py @@ -306,6 +306,17 @@ class ConsoleUI(component.Component): return ret + def get_torrent_name(self, torrent_id): + if self.interactive and hasattr(self.screen,"get_torrent_name"): + return self.screen.get_torrent_name(torrent_id) + + for tid, name in self.torrents: + if torrent_id == tid: + return name + + return None + + def set_batch_write(self, batch): # only kept for legacy reasons, don't actually do anything pass