vexorian / dizquetv

Create live TV channels from your own media. Access the streams using the simulated HDHomerun tuner or the generated M3U URl.
zlib License
1.47k stars 95 forks source link

plex paths in plex.js #214

Closed ReenigneArcher closed 3 weeks ago

ReenigneArcher commented 3 years ago

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

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

ReenigneArcher commented 3 years ago

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