mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-24 20:53:09 +00:00
Add X-Plex-Language header to config (#1241)
This commit is contained in:
parent
fdc89c8acb
commit
cbaaa196da
3 changed files with 6 additions and 0 deletions
|
@ -130,6 +130,10 @@ Section [header] Options
|
|||
Header value used for X_PLEX_IDENTIFIER to all Plex server and Plex client requests. This is generally
|
||||
a UUID, serial number, or other number unique id for the device (default: `result of hex(uuid.getnode())`).
|
||||
|
||||
**language**
|
||||
Header value used for X_PLEX_LANGUAGE to all Plex server and Plex client requests. This is an ISO 639-1
|
||||
language code (default: en).
|
||||
|
||||
**platform**
|
||||
Header value used for X_PLEX_PLATFORM to all Plex server and Plex client requests. Example platforms
|
||||
include: iOS, MacOSX, Android, LG (default: `result of platform.uname()[0]`).
|
||||
|
|
|
@ -30,6 +30,7 @@ X_PLEX_VERSION = CONFIG.get('header.version', VERSION)
|
|||
X_PLEX_DEVICE = CONFIG.get('header.device', X_PLEX_PLATFORM)
|
||||
X_PLEX_DEVICE_NAME = CONFIG.get('header.device_name', uname()[1])
|
||||
X_PLEX_IDENTIFIER = CONFIG.get('header.identifier', str(hex(getnode())))
|
||||
X_PLEX_LANGUAGE = CONFIG.get('header.language', 'en')
|
||||
BASE_HEADERS = reset_base_headers()
|
||||
|
||||
# Logging Configuration
|
||||
|
|
|
@ -63,6 +63,7 @@ def reset_base_headers():
|
|||
'X-Plex-Device': plexapi.X_PLEX_DEVICE,
|
||||
'X-Plex-Device-Name': plexapi.X_PLEX_DEVICE_NAME,
|
||||
'X-Plex-Client-Identifier': plexapi.X_PLEX_IDENTIFIER,
|
||||
'X-Plex-Language': plexapi.X_PLEX_LANGUAGE,
|
||||
'X-Plex-Sync-Version': '2',
|
||||
'X-Plex-Features': 'external-media',
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue