1
0
Fork 0
mirror of https://github.com/correl/Transmission-XBMC.git synced 2025-03-27 09:15:21 -09:00

Fixed adding torrents when the client is not on the same machine as the server

This commit is contained in:
Correl Roush 2011-09-07 20:22:59 -04:00
parent 205ac2187f
commit 88ad2d5a52

View file

@ -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()