mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2025-01-08 19:08:20 +00:00
Wait until we're ready to connect to import transmissionrpc
This lets the GUI start and display a progress indicator before the connection is attempted, so users aren't left hanging thinking nothing is happening.
This commit is contained in:
parent
cf73454ff5
commit
d5d921f8b2
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,6 @@ import sys
|
|||
import base64
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
import transmissionrpc
|
||||
from basictypes.bytes import Bytes
|
||||
from repeater import Repeater
|
||||
|
||||
|
@ -32,6 +31,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
'user': __settings__.getSetting('rpc_user'),
|
||||
'password': __settings__.getSetting('rpc_password')
|
||||
}
|
||||
import transmissionrpc
|
||||
try:
|
||||
self.transmission = transmissionrpc.transmission.Client(**params)
|
||||
except transmissionrpc.transmission.TransmissionError:
|
||||
|
@ -200,4 +200,4 @@ class TorrentInfoGUI(xbmcgui.WindowXMLDialog):
|
|||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue