mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2024-11-21 19:18:41 +00:00
Avoid reloading the list when the settings have not changed
This commit is contained in:
parent
cc36c737b7
commit
5cf0c5a308
1 changed files with 14 additions and 13 deletions
|
@ -205,22 +205,23 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
# Settings button
|
||||
prev_settings = self.get_settings()
|
||||
__settings__.openSettings()
|
||||
p = xbmcgui.DialogProgress()
|
||||
p.create(_(0), _(1)) # 'Transmission', 'Connecting to Transmission'
|
||||
try:
|
||||
self.transmission = self.get_rpc_client()
|
||||
self.updateTorrents()
|
||||
p.close()
|
||||
except:
|
||||
p.close()
|
||||
xbmcgui.Dialog().ok(_(2), _(9001))
|
||||
# restore settings
|
||||
self.set_settings(prev_settings)
|
||||
if self.get_settings() != prev_settings:
|
||||
p = xbmcgui.DialogProgress()
|
||||
p.create(_(0), _(1)) # 'Transmission', 'Connecting to Transmission'
|
||||
try:
|
||||
self.transmission = self.get_rpc_client()
|
||||
except err:
|
||||
self.updateTorrents()
|
||||
p.close()
|
||||
except:
|
||||
p.close()
|
||||
xbmcgui.Dialog().ok(_(2), _(9001))
|
||||
self.close()
|
||||
# restore settings
|
||||
self.set_settings(prev_settings)
|
||||
try:
|
||||
self.transmission = self.get_rpc_client()
|
||||
except err:
|
||||
xbmcgui.Dialog().ok(_(2), _(9001))
|
||||
self.close()
|
||||
if (controlID == self.getCurrentViewControlID()):
|
||||
# Do nothing, just select the item
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue