From 2133beba32e3829fc7aa1d513c62a7dcc19966a0 Mon Sep 17 00:00:00 2001 From: IMISSED Date: Tue, 21 Jun 2022 19:48:49 -0700 Subject: [PATCH] Update main.py --- SpeedTest/main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SpeedTest/main.py b/SpeedTest/main.py index ef2648d..30eb78a 100644 --- a/SpeedTest/main.py +++ b/SpeedTest/main.py @@ -108,7 +108,9 @@ def startSpeedTest(server): serverlist = getServers() if not TPClient.choiceUpdateList[TP_PLUGIN_ACTIONS["Start speedtest"]["data"]["SpeedtestServer"]["id"]] == list(serverlist.keys()): - TPClient.stateUpdate(TP_PLUGIN_ACTIONS["Start speedtest"]["data"]["SpeedtestServer"]["id"], list(serverlist.keys())) + serverchoices = ["Best server (based on ping)"] + serverchoices.extend(list(serverlist.keys())) + TPClient.stateUpdate(TP_PLUGIN_ACTIONS["Start speedtest"]["data"]["SpeedtestServer"]["id"], serverchoices) if server == "Best server (based on ping)": sptest.get_best_server() @@ -155,7 +157,9 @@ def onStart(data): settingsHandler(data.get('settings', [])) servers = getServers() - TPClient.choiceUpdate(TP_PLUGIN_ACTIONS["Start speedtest"]["data"]["SpeedtestServer"]["id"], list(servers.keys())) + serverchoices = ["Best server (based on ping)"] + serverchoices.extend(list(servers.keys())) + TPClient.choiceUpdate(TP_PLUGIN_ACTIONS["Start speedtest"]["data"]["SpeedtestServer"]["id"], serverchoices) # checking for update github_check = Tools.updateCheck("KillerBOSS2019", "TP-Speed-Test-Plugin") @@ -286,4 +290,4 @@ def main(): return ret if __name__ == "__main__": - sys.exit(main()) \ No newline at end of file + sys.exit(main())