]> p2p-next.cs.pub.ro Git - living-lab-site.git/blobdiff - cis/bt.py
cis notified web server of a job completion; upload form interface and validation...
[living-lab-site.git] / cis / bt.py
index 74d43abe11eec04148a9f293bb33ff68cbd4674a..894ea947692ec4b7fd3bee1d18e75482fa60027e 100644 (file)
--- a/cis/bt.py
+++ b/cis/bt.py
@@ -101,3 +101,17 @@ class BitTorrent:
                 self.session.remove_download(dl, remove_content)
                 logger.log_msg('torrent "%s" stopped' % torrent)
                 break
                 self.session.remove_download(dl, remove_content)
                 logger.log_msg('torrent "%s" stopped' % torrent)
                 break
+    
+    def get_torrent_list(self):
+        """
+        Returns a list of all torrents started.
+        """
+        
+        downloads = self.session.get_downloads()
+        torrent_list = []
+        
+        for dl in downloads:
+            tdef = dl.get_def()
+            torrent_list.append(tdef.get_name() + '.tstream')
+        
+        return torrent_list