From 88ad2d5a52088c434bbb65fe1c894626729432ce Mon Sep 17 00:00:00 2001 From: Correl Roush <correl@gmail.com> Date: Wed, 7 Sep 2011 20:22:59 -0400 Subject: [PATCH] Fixed adding torrents when the client is not on the same machine as the server --- resources/lib/gui.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/lib/gui.py b/resources/lib/gui.py index 6e46db1..3ca68e6 100644 --- a/resources/lib/gui.py +++ b/resources/lib/gui.py @@ -108,8 +108,13 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog): if (controlID == 11): # Add torrent d = xbmcgui.Dialog() - f = d.browse(1, _(0), 'files', '.torrent') - self.transmission.add_url(f) + filename = d.browse(1, _(0), 'files', '.torrent') + try: + f = open(filename, 'r') + data = base64.b64encode(f.read()) + self.transmission.add(data) + except: + pass if (controlID == 12): # Remove selected torrent item = list.getSelectedItem()