Merge pull request #1027 from croneter/language

Always use the current Kodi language when communicating with the PMS (restart Kodi when changing the language!)
This commit is contained in:
croneter 2019-10-31 13:39:18 +01:00 committed by GitHub
commit cdb8141adf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,8 @@
from __future__ import absolute_import, division, unicode_literals
from logging import getLogger
import xbmc
from . import utils
from . import variables as v
@ -31,7 +33,7 @@ def getXArgsDeviceInfo(options=None, include_token=True):
'Connection': 'keep-alive',
"Content-Type": "application/x-www-form-urlencoded",
# "Access-Control-Allow-Origin": "*",
# 'X-Plex-Language': 'en',
'Accept-Language': xbmc.getLanguage(xbmc.ISO_639_1),
'X-Plex-Device': v.DEVICE,
'X-Plex-Model': v.MODEL,
'X-Plex-Device-Name': v.DEVICENAME,