premier league bug fixed

This commit is contained in:
Neythen Treloar 2022-02-26 15:50:10 +00:00
parent 9a26c33779
commit d71b2af8fb
2 changed files with 17 additions and 5 deletions

View File

@ -371,7 +371,11 @@ def updateLeagueTables(api_key):
leagues_info = {}
for league in leagues:
url += league + ','
if league == 'Premier League':
url += 'PL,'
else:
url += league + ','
url = url[:-1] # remove last comma
url += '&apiKey=' + api_key
r = requests.get(url)
@ -437,7 +441,11 @@ def updateLeagueEvents(api_key, time):
leagues_info = {}
for league in leagues:
url += league + ','
if league == 'Premier League':
url += 'PL,'
else:
url += league + ','
url = url[:-1] # remove last comma
url += '&apiKey=' + api_key
@ -580,6 +588,8 @@ if __name__ == '__main__':
api_keys = f.readlines()
api_key = api_keys[0].strip()
try:
weather_key = api_keys[1].strip()
except Exception as e:

View File

@ -237,7 +237,7 @@ def update():
os.system("sudo reboot now")
return index()
@app.route("/restart", methods=['PUT','POST'])
@app.route("/restart")
def restart():
os.system("sudo reboot now")
return index()
@ -468,12 +468,14 @@ def screensaver():
global ticker
global api_caller
global screensaver_p
api_caller.close()
ticker.close()
data = str(request.data)
if displaying_screensaver:
screensaver_p.close()
else:
api_caller.close()
ticker.close()
if "Pulsating Colors" in data: