mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Fix Plex.tv authentication with special characters
This commit is contained in:
parent
8b0959aa69
commit
59ce3404c9
1 changed files with 2 additions and 2 deletions
|
@ -144,7 +144,7 @@ class PlexTV(object):
|
|||
Plex.tv authentication
|
||||
"""
|
||||
|
||||
def __init__(self, username=None, password=None, token=None):
|
||||
def __init__(self, username='', password='', token=None):
|
||||
self.protocol = 'HTTPS'
|
||||
self.username = username
|
||||
self.password = password
|
||||
|
@ -168,7 +168,7 @@ class PlexTV(object):
|
|||
|
||||
def get_plex_auth(self, output_format='raw'):
|
||||
uri = '/users/sign_in.xml'
|
||||
base64string = base64.encodestring('%s:%s' % (self.username, self.password)).replace('\n', '')
|
||||
base64string = base64.b64encode(('%s:%s' % (self.username, self.password)).encode('utf-8'))
|
||||
headers = {'Content-Type': 'application/xml; charset=utf-8',
|
||||
'X-Plex-Device-Name': 'PlexPy',
|
||||
'X-Plex-Product': 'PlexPy',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue