Skip to content

Commit

Permalink
Update for how PLEX handles their session data authentication
Browse files Browse the repository at this point in the history
They only allow GET on this now(used to be POST) as well as added the Xtoken.
  • Loading branch information
bigbasec committed Feb 7, 2021
1 parent 01bebc5 commit a5c593b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ private void setupXstream() {
*/
public @Nullable MediaContainer getSessionData() {
try {
String url = "http://" + host + ":" + String.valueOf(port) + "/status/sessions";
MediaContainer mediaContainer = doHttpRequest("POST", url, getClientHeaders(), MediaContainer.class);
String url = "http://" + host + ":" + String.valueOf(port) + "/status/sessions" + "?X-Plex-Token=" + token;
MediaContainer mediaContainer = doHttpRequest("GET", url, getClientHeaders(), MediaContainer.class);
return mediaContainer;
} catch (Exception e) {
logger.warn("An exception occurred while polling the PLEX Server: '{}'", e.getMessage());
Expand Down

0 comments on commit a5c593b

Please sign in to comment.