dizquetv
dizquetv copied to clipboard
plex paths in plex.js
I am attempting to replicate the functionality of updating plex channels and dvrs based on your plex.js script. My plan is to automatically enable all channels if it's possible and auto map the channel number to the xml number. This script and this post (https://github.com/pkkid/python-plexapi/issues/182#issuecomment-532228060) are the only references I've been able to find any information about the dvr api. Hoping you can help.
I am using python and was able to get the dvr info from `/livetv/dvrs'
I can't for the life of me post a request to http://127.0.0.1:32400/livetv/dvrs/<mydvr_key>/refreshGuide
No matter what I try I get a 401 Unauthorized error. I'm using the same headers as when I login to get the dvrs json. Any idea what headers I need to pass in order to access this api?
I'm currently just using
- 'X-Plex-Token' :
<my token>
- 'Accept' : 'application/json'
Any advice you can give would be greatly appreciated.
Also, not a big deal but there is a typo in this line. https://github.com/vexorian/dizquetv/blob/f428dbecf0c4fd51f9fba1a91fa98eaaae7bbdb8/src/plex.js#L149
I was able to get the dvrs to refresh the guide information. My original code wasn't making the post request properly.
Last thing is updating the channels.
For this function... https://github.com/vexorian/dizquetv/blob/f428dbecf0c4fd51f9fba1a91fa98eaaae7bbdb8/src/plex.js#L162
Could you provide an example of what "qs" actually is? https://github.com/vexorian/dizquetv/blob/f428dbecf0c4fd51f9fba1a91fa98eaaae7bbdb8/src/plex.js#L176