mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-10-13 12:22:04 +00:00
Also quote /
This commit is contained in:
parent
7941eb4a9c
commit
beaa66e739
2 changed files with 11 additions and 9 deletions
|
@ -407,10 +407,10 @@ class API(object):
|
||||||
|
|
||||||
def get_default_headers(self):
|
def get_default_headers(self):
|
||||||
auth = "MediaBrowser "
|
auth = "MediaBrowser "
|
||||||
auth += "Client=%s, " % quote(self.config.data["app.name"])
|
auth += "Client=%s, " % quote(self.config.data["app.name"], safe="")
|
||||||
auth += "Device=%s, " % quote(self.config.data["app.device_name"])
|
auth += "Device=%s, " % quote(self.config.data["app.device_name"], safe="")
|
||||||
auth += "DeviceId=%s, " % quote(self.config.data["app.device_id"])
|
auth += "DeviceId=%s, " % quote(self.config.data["app.device_id"], safe="")
|
||||||
auth += "Version=%s" % quote(self.config.data["app.version"])
|
auth += "Version=%s" % quote(self.config.data["app.version"], safe="")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
|
|
|
@ -249,21 +249,23 @@ class HTTP(object):
|
||||||
|
|
||||||
auth = "MediaBrowser "
|
auth = "MediaBrowser "
|
||||||
auth += "Client=%s, " % quote(
|
auth += "Client=%s, " % quote(
|
||||||
self.config.data.get("app.name", "Jellyfin for Kodi")
|
self.config.data.get("app.name", "Jellyfin for Kodi"), safe=""
|
||||||
)
|
)
|
||||||
auth += "Device=%s, " % quote(
|
auth += "Device=%s, " % quote(
|
||||||
self.config.data.get("app.device_name", "Unknown Device")
|
self.config.data.get("app.device_name", "Unknown Device"), safe=""
|
||||||
)
|
)
|
||||||
auth += "DeviceId=%s, " % quote(
|
auth += "DeviceId=%s, " % quote(
|
||||||
self.config.data.get("app.device_id", "Unknown Device id")
|
self.config.data.get("app.device_id", "Unknown Device id"), safe=""
|
||||||
|
)
|
||||||
|
auth += "Version=%s" % quote(
|
||||||
|
self.config.data.get("app.version", "0.0.0"), safe=""
|
||||||
)
|
)
|
||||||
auth += "Version=%s" % quote(self.config.data.get("app.version", "0.0.0"))
|
|
||||||
|
|
||||||
data["headers"].update({"x-emby-authorization": auth})
|
data["headers"].update({"x-emby-authorization": auth})
|
||||||
|
|
||||||
if self.config.data.get("auth.token") and self.config.data.get("auth.user_id"):
|
if self.config.data.get("auth.token") and self.config.data.get("auth.user_id"):
|
||||||
|
|
||||||
auth += ", UserId=%s" % quote(self.config.data.get("auth.user_id"))
|
auth += ", UserId=%s" % quote(self.config.data.get("auth.user_id"), safe="")
|
||||||
data["headers"].update(
|
data["headers"].update(
|
||||||
{
|
{
|
||||||
"x-emby-authorization": auth,
|
"x-emby-authorization": auth,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue