add get_torrent_name

This commit is contained in:
Nick 2011-02-21 17:43:35 +01:00
parent d9d8762c8e
commit 3da5cd9816

View File

@ -258,6 +258,12 @@ class AllTorrents(BaseMode):
if refresh: if refresh:
self.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): def _scroll_up(self, by):
prevoff = self.curoff prevoff = self.curoff
self.cursel = max(self.cursel - by,1) self.cursel = max(self.cursel - by,1)