Describe the issue
There's currently no programmatic way to override Platform and Client name.
Hacks like overwriting X_PLEX_PLATFORM / X_PLEX_DEVICE_NAME do not work without more internal symbols hacking, because those values are copied elsewhere:
Setting environment variables also does not work, as that needs to be done before the import plexapi is called.
Code snippets
from os import getenv, environ
import plexapi
plex_config = {
'PLEXAPI_HEADER_PLATFORM': 'PlexTraktSync',
'PLEXAPI_HEADER_DEVICE_NAME': 'PlexTraktSync',
}
plexapi.X_PLEX_DEVICE_NAME = 'PlexTraktSync'
for k, v in plex_config.items():
environ[k] = v
Expected behavior
plex = PlexServer(url, token, device_platform='PlexTraktSync')
Additional context
Trying to make changes identifiable to be able to skip own changes. I.e skip changes identified by named device:
Describe the issue
There's currently no programmatic way to override Platform and Client name.
Hacks like overwriting
X_PLEX_PLATFORM/X_PLEX_DEVICE_NAMEdo not work without more internal symbols hacking, because those values are copied elsewhere:Setting environment variables also does not work, as that needs to be done before the
import plexapiis called.Code snippets
Expected behavior
Additional context
Trying to make changes identifiable to be able to skip own changes. I.e skip changes identified by named device: