From 7950610b4d73deae8ec9ac418a475866191b4d3f Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 15 Jan 2023 09:56:53 -0500 Subject: [PATCH] pep8 - websocket_client.py --- resources/lib/websocket_client.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/resources/lib/websocket_client.py b/resources/lib/websocket_client.py index 06654cc..ce849a0 100644 --- a/resources/lib/websocket_client.py +++ b/resources/lib/websocket_client.py @@ -157,7 +157,9 @@ class WebSocketClient(threading.Thread): elif command == 'SetVolume': volume = arguments['Volume'] - xbmc.executebuiltin('SetVolume(%s[,showvolumebar])' % volume) + xbmc.executebuiltin( + 'SetVolume({}[,showvolumebar])'.format(volume) + ) elif command == 'SetAudioStreamIndex': index = int(arguments['Index']) @@ -169,7 +171,7 @@ class WebSocketClient(threading.Thread): elif command == 'SetRepeatMode': mode = arguments['RepeatMode'] - xbmc.executebuiltin('xbmc.PlayerControl(%s)' % mode) + xbmc.executebuiltin('xbmc.PlayerControl({})'.format(mode)) elif command == 'DisplayMessage': @@ -252,7 +254,9 @@ class WebSocketClient(threading.Thread): else: server = server.replace('http://', 'ws://') - websocket_url = "%s/socket?api_key=%s&deviceId=%s" % (server, token, self.device_id) + websocket_url = "{}/socket?api_key={}&deviceId={}".format( + server, token, self.device_id + ) log.debug("websocket url: {0}".format(websocket_url)) self._client = websocket.WebSocketApp(