def logout(self, url): """Logout of the current account and reset the session""" common.debug('Logging out of current account') g.settings_monitor_suspend(True) # Disable and reset auto-update / auto-sync features g.ADDON.setSettingInt('lib_auto_upd_mode', 0) g.ADDON.setSettingBool('lib_sync_mylist', False) g.SHARED_DB.delete_key('sync_mylist_profile_guid') # Disable and reset the auto-select profile g.LOCAL_DB.set_value('autoselect_profile_guid', '') g.ADDON.setSetting('autoselect_profile_name', '') g.ADDON.setSettingBool('autoselect_profile_enabled', False) g.settings_monitor_suspend(False) # Delete cookie and credentials cookies.delete(self.account_hash) self._get('logout') common.purge_credentials() common.info('Logout successful') ui.show_notification(common.get_local_string(30113)) self._init_session() xbmc.executebuiltin('Container.Update(path,replace)' ) # Go to a fake page to clear screen # Open root page xbmc.executebuiltin('Container.Update({},replace)'.format( url)) # replace=reset history
def logout(self): """Logout of the current account and reset the session""" common.debug('Logging out of current account') cookies.delete(self.account_hash) self._get('logout') common.purge_credentials() common.info('Logout successful') ui.show_notification(common.get_local_string(30113)) self._init_session()
def logout(self): """Logout of the current account and reset the session""" common.debug('Logging out of current account') cookies.delete(self.account_hash) self._get('logout') common.purge_credentials() common.info('Logout successful') ui.show_notification(common.get_local_string(30113)) self._init_session() xbmc.executebuiltin('XBMC.Container.Update(path,replace)') # Clean path history xbmc.executebuiltin('XBMC.ActivateWindow(Home)')
def logout(self, url): """Logout of the current account and reset the session""" common.debug('Logging out of current account') # Perform the website logout self._get('logout') g.settings_monitor_suspend(True) # Disable and reset auto-update / auto-sync features g.ADDON.setSettingInt('lib_auto_upd_mode', 1) g.ADDON.setSettingBool('lib_sync_mylist', False) g.SHARED_DB.delete_key('sync_mylist_profile_guid') # Disable and reset the auto-select profile g.LOCAL_DB.set_value('autoselect_profile_guid', '') g.ADDON.setSetting('autoselect_profile_name', '') g.ADDON.setSettingBool('autoselect_profile_enabled', False) # Reset of selected profile guid for library playback g.LOCAL_DB.set_value('library_playback_profile_guid', '') g.ADDON.setSetting('library_playback_profile', '') g.settings_monitor_suspend(False) # Delete cookie and credentials self.session.cookies.clear() cookies.delete(self.account_hash) common.purge_credentials() # Reset the ESN obtained from website/generated g.LOCAL_DB.set_value('esn', '', TABLE_SESSION) # Reinitialize the MSL handler (delete msl data file, then reset everything) common.send_signal(signal=common.Signals.REINITIALIZE_MSL_HANDLER, data=True) g.CACHE.clear(clear_database=True) common.info('Logout successful') ui.show_notification(common.get_local_string(30113)) self._init_session() xbmc.executebuiltin('Container.Update(path,replace)' ) # Go to a fake page to clear screen # Open root page xbmc.executebuiltin('Container.Update({},replace)'.format( url)) # replace=reset history
def logout(self, url): """Logout of the current account and reset the session""" common.debug('Logging out of current account') # Disable and reset auto-update / auto-sync features g.settings_monitor_suspended(True) g.ADDON.setSettingInt('lib_auto_upd_mode', 0) g.ADDON.setSettingBool('lib_sync_mylist', False) g.settings_monitor_suspended(False) g.SHARED_DB.delete_key('sync_mylist_profile_guid') cookies.delete(self.account_hash) self._get('logout') common.purge_credentials() common.info('Logout successful') ui.show_notification(common.get_local_string(30113)) self._init_session() xbmc.executebuiltin( 'XBMC.Container.Update(path,replace)') # Clean path history xbmc.executebuiltin( 'Container.Update({})'.format(url)) # Open root page