-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Labels
Description
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] = vExpected 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: