Save client id with token

This commit is contained in:
JonnyWong16 2022-01-20 23:11:21 -08:00
parent 654ff7bdb6
commit 8bb83cff64
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 7 additions and 6 deletions

View file

@ -207,7 +207,6 @@ class WebInterface(object):
@requireAuth(member_of("admin"))
def welcome(self, **kwargs):
config = {
"pms_client_id": plexpy.CONFIG.PMS_CLIENT_ID,
"pms_identifier": plexpy.CONFIG.PMS_IDENTIFIER,
"pms_ip": plexpy.CONFIG.PMS_IP,
"pms_port": plexpy.CONFIG.PMS_PORT,
@ -228,10 +227,12 @@ class WebInterface(object):
@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth(member_of("admin"))
def save_pms_token(self, token=None, **kwargs):
def save_pms_token(self, token=None, client_id=None, **kwargs):
if token is not None:
plexpy.CONFIG.PMS_TOKEN = token
plexpy.CONFIG.write()
if client_id is not None:
plexpy.CONFIG.PMS_CLIENT_ID = client_id
plexpy.CONFIG.write()
@cherrypy.expose
@cherrypy.tools.json_out()