mstinaff / PMS_Updater

Shell script for updating the Plex Media Server inside the FreeNAS Plex plugin
MIT License
441 stars 90 forks source link

Use new endpoint for Plex v >=1.15 #30

Closed ErebusBat closed 5 years ago

ErebusBat commented 5 years ago

It should be noted that this endpoint does not seem to be returning any data yet:

$ curl -i https://plex.tv/api/downloads/5.json
HTTP/2 200
date: Thu, 14 Feb 2019 16:56:33 GMT
content-type: application/json; charset=utf-8
x-ua-compatible: chrome=1
cache-control: no-cache
vary: Origin
x-request-id: a62d5e59-c4e9-4398-bedc-42aa28745b7e
x-runtime: 0.007216
strict-transport-security: max-age=0
referrer-policy: origin-when-cross-origin
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 1; mode=block

{"computer":{},"nas":{}}%

Closes #29

StarkITA commented 5 years ago

I hope @mstinaff will merge this commit. 1.json will live on as a redirect to 5.json, but this is disrupting functionality of the script right now, which is very widely used.

The endpoint does return data, but only if you provide it a valid Plex Token as per this and this posts.