Skip to content

Commit

Permalink
ignore non-standard transition error on Sony KD-55XE9005
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-ld committed Apr 20, 2021
1 parent e168450 commit e62be82
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions smart_tv_telegram/devices/upnp_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,15 @@ async def _upnp_safe_stop(service: async_upnp_client.UpnpService):
try:
await stop.async_call(InstanceID=0)
except UpnpError as error:
if "transition not available" not in str(error).lower():
raise error
normalized_error = str(error).lower()

if "transition not available" in normalized_error:
return

if "action stop failed" in normalized_error:
return

raise error


class UpnpReconnectFunction(DevicePlayerFunction):
Expand Down

0 comments on commit e62be82

Please sign in to comment.