mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-21 15:40:32 +00:00
Fixing unicode bug for device name
Removing decode to unicode, because we use it for the downloadutils. We need it in utf-8, not unicode.
This commit is contained in:
parent
8adfa7a911
commit
65be0b6262
2 changed files with 4 additions and 4 deletions
|
@ -189,7 +189,7 @@ class DownloadUtils():
|
|||
# If user is not authenticated
|
||||
auth = (
|
||||
'MediaBrowser Client="Kodi", Device="%s", DeviceId="%s", Version="%s"'
|
||||
% (deviceName, deviceId, version))
|
||||
% (deviceName, deviceId.encode('utf-8'), version.encode('utf-8')))
|
||||
header = {
|
||||
|
||||
'Content-type': 'application/json',
|
||||
|
@ -205,7 +205,8 @@ class DownloadUtils():
|
|||
# Attached to the requests session
|
||||
auth = (
|
||||
'MediaBrowser UserId="%s", Client="Kodi", Device="%s", DeviceId="%s", Version="%s"'
|
||||
% (userId, deviceName, deviceId, version))
|
||||
% (userId.encode('utf-8'), deviceName, deviceId.encode('utf-8'),
|
||||
version.encode('utf-8')))
|
||||
header = {
|
||||
|
||||
'Content-type': 'application/json',
|
||||
|
@ -274,7 +275,6 @@ class DownloadUtils():
|
|||
verify=verifyssl)
|
||||
|
||||
elif type == "POST":
|
||||
print url
|
||||
r = requests.post(url,
|
||||
json=postBody,
|
||||
headers=header,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue