Ignore remote Plex clients during plex.tv lookup (#38327)

This commit is contained in:
jjlawren 2020-07-29 13:56:32 -05:00 committed by GitHub
parent 497c1587fe
commit 1d987b4846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,7 @@ class PlexServer:
self._plextv_clients = [
x
for x in self.account.resources()
if "player" in x.provides and x.presence
if "player" in x.provides and x.presence and x.publicAddressMatches
]
_LOGGER.debug(
"Current available clients from plex.tv: %s", self._plextv_clients

View File

@ -53,6 +53,7 @@ class MockResource:
self.provides = ["player"]
self.device = MockPlexClient(f"http://192.168.0.1{index}:32500", index + 10)
self.presence = index == 0
self.publicAddressMatches = True
def connect(self, timeout):
"""Mock the resource connect method."""