Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KillerBOSS2019 authored Jun 22, 2022
1 parent 34b1a4a commit 2133beb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions SpeedTest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -286,4 +290,4 @@ def main():
return ret

if __name__ == "__main__":
sys.exit(main())
sys.exit(main())

0 comments on commit 2133beb

Please sign in to comment.