Question: Automating the first login after plex is stood up.
Closed this issue · 3 comments
So how can I trigger that first login after Plex is first stood up?
Thanks,
Levi
You would need to figure out a number of things to make it happen...
Here's what I see when inspecting the network traffic after a fake sign in attempt...
You'll need to figure out
- Plex web version
- Plex Client Identifier
- Most of the rest you can probably hard code
On top of those things... the sign in is triggered via javascript on the page, so a callback method (which i haven't tried to figure out) would need to be called with the results.
IMO, if you care to automatically login after provisioning... your best bet is to write an authentication "test" in selenium or some other web testing framework.
Yeah... Complicated ;), wish they offered something through API....
The first step I took was adding a port redirect from external to loopback so I wouldn't have to ssh tunnel in to hit the local address and login (headless vps).
@marvinpinto One more thing... I have been copying over the Preferences.xml from one hosts to another when it's replaced and this seems to do the trick. The only thing I have to do is open up a ssh tunnel, I don't even have to sign into plex, and the new server will appear in my plex server. I thought I could get nifty and set a iptable rule with my ansible playbook so I could do the initial plex login and setup from external ip, however after signing in it just shows me all my old servers and not my new one. I still have to use SSH tunnel. This is the rule I'm using... Chain PREROUTING (policy ACCEPT) target prot opt source destination DNAT tcp -- anywhere anywhere tcp dpt:32401 to:127.0.0.1:32400
Any way I can use an iptables rule instead of ssh tunnel?
Thanks,
Levi