Module: deluge Branch: master Commit: 3da5cd9816c9ddc5ea30779934d6e1a65e03d399
Author: Nick <[email protected]> Date: Mon Feb 21 17:43:35 2011 +0100 add get_torrent_name --- deluge/ui/console/modes/alltorrents.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index e9d1899..ee57a59 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -258,6 +258,12 @@ class AllTorrents(BaseMode): if refresh: self.refresh() + def get_torrent_name(self, torrent_id): + for p,i in enumerate(self._sorted_ids): + if torrent_id == i: + return self.torrent_names[p] + return None + def _scroll_up(self, by): prevoff = self.curoff self.cursel = max(self.cursel - by,1) -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
