mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2025-03-18 17:00:14 -09: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
|
# Settings button
|
||||||
prev_settings = self.get_settings()
|
prev_settings = self.get_settings()
|
||||||
__settings__.openSettings()
|
__settings__.openSettings()
|
||||||
p = xbmcgui.DialogProgress()
|
if self.get_settings() != prev_settings:
|
||||||
p.create(_(0), _(1)) # 'Transmission', 'Connecting to Transmission'
|
p = xbmcgui.DialogProgress()
|
||||||
try:
|
p.create(_(0), _(1)) # 'Transmission', 'Connecting to Transmission'
|
||||||
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)
|
|
||||||
try:
|
try:
|
||||||
self.transmission = self.get_rpc_client()
|
self.transmission = self.get_rpc_client()
|
||||||
except err:
|
self.updateTorrents()
|
||||||
|
p.close()
|
||||||
|
except:
|
||||||
|
p.close()
|
||||||
xbmcgui.Dialog().ok(_(2), _(9001))
|
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()):
|
if (controlID == self.getCurrentViewControlID()):
|
||||||
# Do nothing, just select the item
|
# Do nothing, just select the item
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Reference in a new issue