From e1c2a04571e90d2601fd03a815647fbc763095f5 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 10 Oct 2016 03:54:20 -0500 Subject: [PATCH] Prevent connect manager loading via plugin Prevent from testing connections if launching a sync --- resources/lib/connectmanager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/lib/connectmanager.py b/resources/lib/connectmanager.py index eb7ad14e..96a80a48 100644 --- a/resources/lib/connectmanager.py +++ b/resources/lib/connectmanager.py @@ -13,6 +13,7 @@ import read_embyserver as embyserver import connect.connectionmanager as connectionmanager from dialogs import ServerConnect, UsersConnect, LoginConnect, LoginManual, ServerManual from ga_client import GoogleAnalytics +from utils import window ################################################################################################## @@ -34,7 +35,7 @@ class ConnectManager(object): self.__dict__ = self._shared_state - if not self.state: + if not self.state and not window('emby_currUser'): client_info = clientinfo.ClientInfo() self.emby = embyserver.Read_EmbyServer() @@ -138,10 +139,10 @@ class ConnectManager(object): raise RuntimeError("Connect user is not logged in") def login(self, server=None): - + ga = GoogleAnalytics() ga.sendEventData("Connect", "UserLogin") - + # Return user or raise error server = server or self.state['Servers'][0] server_address = connectionmanager.getServerAddress(server, server['LastConnectionMode'])