Automatically retrieve PlexOnlineToken from PMS hidden settings #615
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An update in Plex Media Server 1.20.3 changed the scope of the
PLEXTOKEN
environment variable token (token prefixed withlocal-
). The local token is only allowed to access the local Plex Media Server API, and not any online Plex.tv API. See the Plex Employee response here. This prevents the Trakt plugin from retrieving Plex account information from Plex.tv.A globally scoped token is still available by using the
PlexOnlineToken
in the the Advanced, Hidden Server Settings. This is the token registered for the Plex Media Server device (i.e. Plex Web > Account Settings > Authorized Devices > Server). Note that this token remains valid as long as the Plex Media server is claimed with a Plex.tv account and does not expire.Changes have been made to the Trakt plugin to fallback to retrieving the
PlexOnlineToken
if thePLEXTOKEN
environment variable token only has local scope. ThePlexOnlineToken
will be retrieved from the Windows Registry, MacOS plist file, or Linux Preferences.xml file depending on the operating system.Fixes #611
Fixes #612