diff --git a/resources/lib/connectmanager.py b/resources/lib/connectmanager.py index 7bb1481e..1d8cf0a8 100644 --- a/resources/lib/connectmanager.py +++ b/resources/lib/connectmanager.py @@ -65,7 +65,7 @@ class ConnectManager(object): def get_server(self, server): self.state = self._connect.connectToAddress(server) - return self.state + return self.get_state() @classmethod def get_address(cls, server): diff --git a/resources/lib/dialogs/usersconnect.py b/resources/lib/dialogs/usersconnect.py index 35737f16..770b0a2c 100644 --- a/resources/lib/dialogs/usersconnect.py +++ b/resources/lib/dialogs/usersconnect.py @@ -4,6 +4,7 @@ import logging +import xbmc import xbmcgui ################################################################################################## @@ -30,6 +31,7 @@ class UsersConnect(xbmcgui.WindowXMLDialog): def __init__(self, *args, **kwargs): + self.kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2]) xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) def set_server(self, server): @@ -58,12 +60,14 @@ class UsersConnect(xbmcgui.WindowXMLDialog): self.setFocus(self.list_) - @classmethod - def _add_listitem(cls, label, user_id, user_image): + def _add_listitem(self, label, user_id, user_image): item = xbmcgui.ListItem(label) item.setProperty('id', user_id) - item.setArt({'Icon': user_image}) + if self.kodi_version > 15: + item.setArt({'Icon': user_image}) + else: + item.setIconImage(user_image) return item diff --git a/resources/settings.xml b/resources/settings.xml index 5034973e..f7787d3e 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -18,7 +18,7 @@ - +