Skip to content

Commit

Permalink
Unable to use join action due to incorrect IP address being fetched (
Browse files Browse the repository at this point in the history
  • Loading branch information
gpcastro authored Dec 9, 2024
1 parent b233075 commit 258546e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/linkplay/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,12 @@ def playmode_support(self) -> list[PlayingMode]:
@property
def eth(self) -> str | None:
"""Returns the ethernet address."""
eth2 = self.properties.get(DeviceAttribute.ETH2)
eth0 = self.properties.get(DeviceAttribute.ETH0)
for eth in [eth2, eth0]:
if eth == "0.0.0.0":
eth = None
return (
eth2
if eth2
else eth0
if eth0
else self.properties.get(DeviceAttribute.APCLI0)
)
eth = self.properties.get(DeviceAttribute.ETH2)
if eth == "0.0.0.0" or eth is None:
eth = self.properties.get(DeviceAttribute.ETH0)
if eth == "0.0.0.0" or eth is None:
eth = self.properties.get(DeviceAttribute.APCLI0)
return eth

async def timesync(self) -> None:
"""Sync the time."""
Expand Down

0 comments on commit 258546e

Please sign in to comment.