Skip to content

Commit

Permalink
Improve mopidy connect handling
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Feb 17, 2024
1 parent 6a42832 commit 4267862
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions server/etc/plug-ins/meta_mopidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,13 @@ def __init__(self, params):
def websocket_loop(self):
logger.info("Started MopidyControl loop")
while True:
self.websocket.run_forever()
sleep(1)
logger.info("Ending MopidyControl loop")
try:
self.websocket.run_forever()
sleep(2)
except Exception as e:
logger.info(f"Exception: {str(e)}")
self.websocket.close()
# logger.info("Ending MopidyControl loop")

def extractImageUrl(self, track_uri, jmsg):
url = None
Expand Down

0 comments on commit 4267862

Please sign in to comment.