Switch to state variables
This commit is contained in:
parent
73ce4eeacb
commit
962ce6da1e
3 changed files with 7 additions and 2 deletions
|
@ -12,6 +12,7 @@ from utils import window, settings, tryEncode, language as lang, dialog
|
|||
from PlexFunctions import GetMachineIdentifier, get_pms_settings, \
|
||||
check_connection
|
||||
import variables as v
|
||||
import state
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
@ -100,8 +101,8 @@ class ConnectManager(object):
|
|||
dia = ServerConnect("script-plex-connect-server.xml", *XML_PATH)
|
||||
kwargs = {
|
||||
'connect_manager': None, # self._connect
|
||||
'username': settings('username'),
|
||||
'user_image': window('PlexUserImage'),
|
||||
'username': state.PLEX_USERNAME,
|
||||
'user_image': state.PLEX_USER_IMAGE,
|
||||
# 'servers': state.get('Servers') or [],
|
||||
# 'emby_connect': False if user else True
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ INDICATE_MEDIA_VERSIONS = False
|
|||
AUTHENTICATED = False
|
||||
# plex.tv username
|
||||
PLEX_USERNAME = None
|
||||
# plex.tv image for this user
|
||||
PLEX_USER_IMAGE = None
|
||||
# Token for that user for plex.tv
|
||||
PLEX_TOKEN = None
|
||||
# Plex ID of that user (e.g. for plex.tv) as a STRING
|
||||
|
|
|
@ -111,6 +111,7 @@ class UserClient(threading.Thread):
|
|||
url = get_user_artwork_url(self.currUser)
|
||||
if url:
|
||||
window('PlexUserImage', value=url)
|
||||
state.PLEX_USER_IMAGE = url
|
||||
# Set resume point max
|
||||
# url = "{server}/emby/System/Configuration?format=json"
|
||||
# result = doUtils.downloadUrl(url)
|
||||
|
@ -282,6 +283,7 @@ class UserClient(threading.Thread):
|
|||
window('plex_servername', clear=True)
|
||||
state.PLEX_USER_ID = None
|
||||
state.PLEX_USERNAME = None
|
||||
state.PLEX_USER_IMAGE = None
|
||||
window('plex_restricteduser', clear=True)
|
||||
state.RESTRICTED_USER = False
|
||||
|
||||
|
|
Loading…
Reference in a new issue