Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
maykar authored Jan 20, 2021
1 parent 52ab9fc commit fdc32da
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions custom_components/plex_assistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ def handle_input(call):
if command["control"]:
control = command["control"]
if client:
if "127.0.0.1" in cast.url("/"):
try:
if "127.0.0.1" in cast.url("/"):
cast.proxyThroughServer()
except plexapi.exceptions.BadRequest:
cast.proxyThroughServer()
plex_c = cast
else:
Expand Down Expand Up @@ -207,7 +210,10 @@ def handle_input(call):

if client:
_LOGGER.debug("Client: %s", cast)
if "127.0.0.1" in cast.url("/"):
try:
if "127.0.0.1" in cast.url("/"):
cast.proxyThroughServer()
except plexapi.exceptions.BadRequest:
cast.proxyThroughServer()
plex_c = cast
plex_c.playMedia(media)
Expand Down

0 comments on commit fdc32da

Please sign in to comment.