mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Change server identification header to allow for basic auth support #52
This commit is contained in:
parent
f5aa791f59
commit
173710f1e0
1 changed files with 3 additions and 3 deletions
|
@ -209,7 +209,7 @@ class HTTP(object):
|
||||||
'User-Agent': self.config['http.user_agent'] or "%s/%s" % (self.config['app.name'], self.config['app.version'])
|
'User-Agent': self.config['http.user_agent'] or "%s/%s" % (self.config['app.name'], self.config['app.version'])
|
||||||
})
|
})
|
||||||
|
|
||||||
if 'Authorization' not in data['headers']:
|
if 'x-emby-authorization' not in data['headers']:
|
||||||
self._authorization(data)
|
self._authorization(data)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
@ -222,12 +222,12 @@ class HTTP(object):
|
||||||
auth += "DeviceId=%s, " % self.config['app.device_id'].encode('utf-8')
|
auth += "DeviceId=%s, " % self.config['app.device_id'].encode('utf-8')
|
||||||
auth += "Version=%s" % self.config['app.version'].encode('utf-8')
|
auth += "Version=%s" % self.config['app.version'].encode('utf-8')
|
||||||
|
|
||||||
data['headers'].update({'Authorization': auth})
|
data['headers'].update({'x-emby-authorization': auth})
|
||||||
|
|
||||||
if self.config['auth.token'] and self.config['auth.user_id']:
|
if self.config['auth.token'] and self.config['auth.user_id']:
|
||||||
|
|
||||||
auth += ', UserId=%s' % self.config['auth.user_id'].encode('utf-8')
|
auth += ', UserId=%s' % self.config['auth.user_id'].encode('utf-8')
|
||||||
data['headers'].update({'Authorization': auth, 'X-MediaBrowser-Token': self.config['auth.token'].encode('utf-8')})
|
data['headers'].update({'x-emby-authorization': auth, 'X-MediaBrowser-Token': self.config['auth.token'].encode('utf-8')})
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue