mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2025-01-09 19:11:07 +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 base64
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
import transmissionrpc
|
|
||||||
from basictypes.bytes import Bytes
|
from basictypes.bytes import Bytes
|
||||||
from repeater import Repeater
|
from repeater import Repeater
|
||||||
|
|
||||||
|
@ -32,6 +31,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
||||||
'user': __settings__.getSetting('rpc_user'),
|
'user': __settings__.getSetting('rpc_user'),
|
||||||
'password': __settings__.getSetting('rpc_password')
|
'password': __settings__.getSetting('rpc_password')
|
||||||
}
|
}
|
||||||
|
import transmissionrpc
|
||||||
try:
|
try:
|
||||||
self.transmission = transmissionrpc.transmission.Client(**params)
|
self.transmission = transmissionrpc.transmission.Client(**params)
|
||||||
except transmissionrpc.transmission.TransmissionError:
|
except transmissionrpc.transmission.TransmissionError:
|
||||||
|
|
Loading…
Reference in a new issue