Kaiede / PlexPlaylistHost

Plugin to make PLEX music playlists available to UPnP/DLNA Clients.
MIT License
12 stars 3 forks source link

Add support for Plex Tokens #2

Closed Kaiede closed 3 years ago

Kaiede commented 4 years ago

Attaching some of the details provided in an another issue.

——

DefaultPrefs.json

{
"id": "plextoken",
"label": "Plex login token",
"type": "text",
"default": "my-token-here-that-I-found-from-viewing-xml-on-an-entity"
}

In init.py (under preferences)

PREFS__PLEXTOKEN = 'plextoken'

(and the updated GetPlexUrl function)

def GetPlexUrl(suffix=None):
plexUrl = 'http://%s:%s' %(Prefs[PREFS__PLEXIP], Prefs[PREFS__PLEXPORT])
if suffix is not None:
plexUrl += suffix

plexUrl += '?X-Plex-Token='
plexUrl += Prefs[PREFS__PLEXTOKEN]

Log.Debug('Requesting Plex URL: %s' % (plexUrl))
return plexUrl
Kaiede commented 3 years ago

It looks like this may be required to unblock Windows users of Plex.

Kaiede commented 3 years ago

Closing this out after tagging 1.0.3 with the merged PR.