Use URI provided by Plex for local connections (#27515)
* Use provided URI for local connections * Use provided plexapi connection method * Remove unused mock from tests * Handle potential edge case(s)
This commit is contained in:
1 parent
564789470e
commit
0888098718
3 files changed
+11
-34
No files matched your search
@@ -89,9 +89,10 @@ class PlexFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
_LOGGER.error("Invalid credentials provided, config not created")
|
||||
errors["base"] = "faulty_credentials"
|
||||
except (plexapi.exceptions.NotFound, requests.exceptions.ConnectionError):
|
||||
_LOGGER.error(
|
||||
"Plex server could not be reached: %s", server_config[CONF_URL]
|
||||
server_identifier = (
|
||||
server_config.get(CONF_URL) or plex_server.server_choice or "Unknown"
|
||||
)
|
||||
_LOGGER.error("Plex server could not be reached: %s", server_identifier)
|
||||
errors["base"] = "not_found"
|
||||
|
||||
except ServerNotSpecified as available_servers:
|
||||
|
||||
Reference in new issue
Block a user