Closed 0rsa closed 4 years ago
Plex version: 1.18.8.2468
The client support is flaky sometimes. I dont think i can fix this as the server can’t find the client
Maybe there is a clue here: https://github.com/phillipj/node-plex-control/issues/32 Thread owner is talking about X-Plex-Target-Client-Identifier which is passed in parameter URL.
We pass that in the headers. (As the docs state we should do)
Ok, thank you :( It's sad, your great software does the hardest work and it just fails stopping Plex playback. Did you have a clean example of query sent with headers / body / url parameters? I'd like to ask plex support to know why it doesn't work with some clients.
Maybe some client require it in the url params as well. I dont know. I dont have the headers we send or the url. You should be able to find the url in the log as for the headers
As the code for the header we use after
def reset_base_headers():
""" Convenience function returns a dict of all base X-Plex-* headers for session requests. """
import plexapi
return {
'X-Plex-Platform': plexapi.X_PLEX_PLATFORM,
'X-Plex-Platform-Version': plexapi.X_PLEX_PLATFORM_VERSION,
'X-Plex-Provides': plexapi.X_PLEX_PROVIDES,
'X-Plex-Product': plexapi.X_PLEX_PRODUCT,
'X-Plex-Version': plexapi.X_PLEX_VERSION,
'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-Sync-Version': '2',
}
The X-Plex-Target-Client-Identifier is handled here: https://github.com/pkkid/python-plexapi/blob/master/plexapi/client.py#L185-L204
Log file:
Thank you