bug fix and update button

This commit is contained in:
Neythen
2021-11-20 15:30:31 +00:00
parent 9c6ad0cde2
commit 9d9306245e
17 changed files with 45 additions and 27 deletions

View File

@@ -167,7 +167,11 @@ def stop():
ticker = pexpect.spawn("sudo -E taskset -c 3 python3 stockTicker.py")
displaying_screensaver = False
return index()
@app.route("/update", methods=['PUT','POST'])
def update():
os.system("./update.sh")
@app.route("/display_format", methods = ['PUT', 'POST', 'GET'])
def display_format():
global professional
@@ -209,24 +213,20 @@ def feature_settings():
# saves files uploaded to the webpage for images and GIFs
@app.route("/upload", methods = ['PUT', 'POST', 'GET'])
def upload():
try:
images = request.files
names = list(request.files.keys())
for name in names:
images[name].save('user_uploads/' +name)
except Exception as e:
print(e)
return index()
@app.route("/brightness", methods=['PUT','POST'])
def brightness():
global brightness
@@ -247,7 +247,7 @@ def brightness():
f = open('csv/settings.csv', 'w+')
f.write('speed,brightness\n')
f.write(str(speed) + ',' + str(brightness))
f.write(str(speed) + ',' + str(int(brightness) - 1))
f.close()
global LastCommand