Feature request: Fetch and update servers non-interactively
chaptergy opened this issue · comments
Feature description
Use case
In case, the IP address of a Plex Media Server is not static, the URL of it changes as well (because it contains the IP). An example snippet from the servers.yml might look like this:
my-plex-server:
token: d9th-onA5iug93-bLxuQ1s
urls:
- https://123-123-123-123.jxrdwhywbaxb0urov6ek8beud9hn1821.plex.direct:10482
- http://123.123.123.123:10482
So whenever the IP address changes, the syncing fails, and instead you have to delete the server.yml and login to Plex again. It would be cool if it could automatically fetch the servers before a sync and update them if necessary, without having to interact with thr cli again. Or if there was a command to update the servers.
Workarounds
Just having a static IP address, I guess
Plan to implement
Not right now, I could look into it in the future, but so far I don't know anything about the Plex API
there is command to log in, it's called plex-login
.
There is, however, that command does require interactive inputs (because it asks to overwrite the existing token and the --username
and --password
args do not seem to work when it already has an access token stored). Even with those working, when two-factor authentication is enabled, the password contains the TOTP token, which is a bit more complicated to add in there.
So what is ticket is about is being able to update the servers non-interactively, without having to enter stuff again.
there's not a word about non-interactively. update issue accordingly then.
This is somewhat related:
It doesn't ask for the token to be input, reuses if account token is present