From 98583d139ac4207604fd728f3d591c2a79cb4636 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:05:47 -0700 Subject: [PATCH] Add config override for PMS_LANGUAGE --- plexpy/config.py | 1 + plexpy/http_handler.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/config.py b/plexpy/config.py index 6f2926d9..dbcd294d 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -55,6 +55,7 @@ _CONFIG_DEFINITIONS = { 'PMS_IP': (str, 'PMS', '127.0.0.1'), 'PMS_IS_CLOUD': (int, 'PMS', 0), 'PMS_IS_REMOTE': (int, 'PMS', 0), + 'PMS_LANGUAGE': (str, 'PMS', ''), 'PMS_LOGS_FOLDER': (str, 'PMS', ''), 'PMS_LOGS_LINE_CAP': (int, 'PMS', 1000), 'PMS_NAME': (str, 'PMS', ''), diff --git a/plexpy/http_handler.py b/plexpy/http_handler.py index 87c4cff5..79bb3562 100644 --- a/plexpy/http_handler.py +++ b/plexpy/http_handler.py @@ -62,7 +62,7 @@ class HTTPHandler(object): plexpy.common.PLATFORM_RELEASE), 'X-Plex-Device-Name': '{} ({})'.format(plexpy.common.PLATFORM_DEVICE_NAME, plexpy.common.PRODUCT), - 'Accept-Language': plexpy.SYS_LANGUAGE + 'X-Plex-Language': plexpy.CONFIG.PMS_LANGUAGE or plexpy.SYS_LANGUAGE } self.token = token